forked from bazel-contrib/bazel-gazelle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
119 lines (110 loc) · 2.71 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
load("@io_bazel_rules_go//go:def.bzl", "nogo")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//:def.bzl", "gazelle", "gazelle_binary")
# gazelle:prefix github.com/bazelbuild/bazel-gazelle
# gazelle:exclude vendor
# gazelle:exclude third_party
# gazelle:exclude .bazelci
# gazelle:exclude .bcr
# gazelle:exclude .idea
# gazelle:exclude .github
# gazelle:exclude .vscode
# gazelle:go_naming_convention import_alias
gazelle(
name = "gazelle",
command = "fix",
gazelle = ":gazelle_local",
)
# gazelle_ci is called from CI to verify the repo is up-to-date, see: .bazelci/presubmit.yml
gazelle(
name = "gazelle_ci",
command = "fix",
extra_args = ["--mode=diff"],
gazelle = ":gazelle_local",
)
gazelle_binary(
name = "gazelle_local",
languages = [
"//language/proto",
"//language/go",
"//internal/language/test_filegroup",
"@bazel_skylib//gazelle/bzl",
],
)
nogo(
name = "nogo",
vet = True,
visibility = ["//visibility:public"],
)
exports_files([
"WORKSPACE",
"extend.md",
"repository.md",
])
filegroup(
name = "all_files",
testonly = True,
# keep
srcs = glob(["vendor/**"]) + [
".bazelrc",
".gitignore",
"AUTHORS",
"BUILD.bazel",
"CODEOWNERS",
"CONTRIBUTING.md",
"CONTRIBUTORS",
"Design.rst",
"LICENSE",
"README.rst",
"WORKSPACE",
"def.bzl",
"deps.bzl",
"extend.rst",
"go.mod",
"go.sum",
"repository.rst",
"//cmd:all_files",
"//config:all_files",
"//flag:all_files",
"//internal:all_files",
"//label:all_files",
"//language:all_files",
"//merger:all_files",
"//pathtools:all_files",
"//repo:all_files",
"//resolve:all_files",
"//rule:all_files",
"//testtools:all_files",
"//walk:all_files",
],
visibility = ["//visibility:public"],
)
bzl_library(
name = "def",
srcs = ["def.bzl"],
visibility = ["//visibility:public"],
deps = [
"//internal:gazelle_binary",
"//internal:go_repository",
"//internal:overlay_repository",
"@bazel_skylib//lib:shell",
],
)
bzl_library(
name = "deps",
srcs = ["deps.bzl"],
visibility = ["//visibility:public"],
deps = [
"//internal:go_repository",
"//internal:go_repository_cache",
"//internal:go_repository_config",
"//internal:go_repository_tools",
"@bazel_tools//tools/build_defs/repo:git.bzl",
],
)
bzl_library(
name = "extensions",
srcs = ["extensions.bzl"],
visibility = ["//visibility:public"],
deps = ["//internal/bzlmod:go_deps"],
)