-
Notifications
You must be signed in to change notification settings - Fork 367
/
BUILD.bazel
130 lines (123 loc) · 2.99 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load(":def.bzl", "std_package_list")
# gazelle:exclude testdata
# TODO(jayconrod): test that the checked-in static file matches the generated
# file. The generated code is checked in so that Gazelle can still be built
# with "go get".
std_package_list(
name = "std_package_list",
out = "std_package_list.go",
)
go_library(
name = "go",
srcs = [
"config.go",
"constants.go",
"dep.go",
"embed.go",
"fileinfo.go",
"fix.go",
"generate.go",
"godep.go",
"kinds.go",
"lang.go",
"modules.go",
"package.go",
"resolve.go",
"std_package_list.go",
"update.go",
],
importpath = "github.com/bazelbuild/bazel-gazelle/language/go",
visibility = ["//visibility:public"],
deps = [
"//config",
"//flag",
"//internal/version",
"//label",
"//language",
"//language/proto",
"//pathtools",
"//repo",
"//resolve",
"//rule",
"@com_github_bazelbuild_buildtools//build:go_default_library",
"@com_github_pelletier_go_toml//:go-toml",
"@org_golang_x_mod//module",
"@org_golang_x_sync//errgroup",
],
)
go_test(
name = "go_test",
srcs = [
"config_test.go",
"fileinfo_go_test.go",
"fileinfo_test.go",
"fix_test.go",
"generate_test.go",
"resolve_test.go",
"stubs_test.go",
"update_import_test.go",
],
data = glob(["testdata/**"]),
embed = [":go"],
deps = [
"//config",
"//label",
"//language",
"//language/proto",
"//merger",
"//pathtools",
"//repo",
"//resolve",
"//rule",
"//testtools",
"//walk",
"@com_github_bazelbuild_buildtools//build:go_default_library",
"@org_golang_x_tools//go/vcs",
],
)
filegroup(
name = "all_files",
testonly = True,
srcs = [
"BUILD.bazel",
"config.go",
"config_test.go",
"constants.go",
"def.bzl",
"dep.go",
"embed.go",
"fileinfo.go",
"fileinfo_go_test.go",
"fileinfo_test.go",
"fix.go",
"fix_test.go",
"generate.go",
"generate_test.go",
"godep.go",
"kinds.go",
"lang.go",
"modules.go",
"package.go",
"resolve.go",
"resolve_test.go",
"std_package_list.go",
"stubs_test.go",
"update.go",
"update_import_test.go",
"//language/go/gen_std_package_list:all_files",
],
visibility = ["//visibility:public"],
)
alias(
name = "go_default_library",
actual = ":go",
visibility = ["//visibility:public"],
)
bzl_library(
name = "def",
srcs = ["def.bzl"],
visibility = ["//visibility:public"],
deps = ["@io_bazel_rules_go//go:def"],
)