BUILD 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_test",
  5. "go_library",
  6. "go_binary",
  7. )
  8. go_test(
  9. name = "go_default_test",
  10. srcs = ["bgl_test.go"],
  11. embed = [":go_default_library"],
  12. tags = ["automanaged"],
  13. )
  14. go_library(
  15. name = "go_default_library",
  16. srcs = [
  17. "ast_inspect.go",
  18. "cache.go",
  19. "file_filter.go",
  20. "lint_register.go",
  21. "main.go",
  22. "model.go",
  23. "script_parser.go",
  24. ],
  25. importpath = "go-common/app/tool/bgr",
  26. tags = ["automanaged"],
  27. visibility = ["//visibility:public"],
  28. deps = [
  29. "//app/tool/bgr/log:go_default_library",
  30. "//vendor/github.com/pkg/errors:go_default_library",
  31. ],
  32. )
  33. filegroup(
  34. name = "package-srcs",
  35. srcs = glob(["**"]),
  36. tags = ["automanaged"],
  37. visibility = ["//visibility:private"],
  38. )
  39. filegroup(
  40. name = "all-srcs",
  41. srcs = [
  42. ":package-srcs",
  43. "//app/tool/bgr/log:all-srcs",
  44. ],
  45. tags = ["automanaged"],
  46. visibility = ["//visibility:public"],
  47. )
  48. go_binary(
  49. name = "bgr",
  50. embed = [":go_default_library"],
  51. tags = ["automanaged"],
  52. )