-
Notifications
You must be signed in to change notification settings - Fork 23
/
BUILD.bazel
125 lines (112 loc) · 4.47 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
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@io_bazel_rules_go//go:def.bzl", "nogo")
load("@npm//:defs.bzl", "npm_link_all_packages")
npm_link_all_packages(name = "node_modules")
# When generating the documents for this repo bazel needs to be started so that we can generate
# the correct flags. To do this we need version from .bazelversion
exports_files([
".bazelversion",
"LICENSE",
"README.md",
])
js_library(
name = "prettierrc",
srcs = [".prettierrc.cjs"],
visibility = ["//visibility:public"],
)
nogo(
name = "nogo",
config = "nogo_config.json",
visibility = ["//visibility:public"],
deps = [
"@org_golang_x_tools//go/analysis/passes/asmdecl",
"@org_golang_x_tools//go/analysis/passes/assign",
"@org_golang_x_tools//go/analysis/passes/atomic",
"@org_golang_x_tools//go/analysis/passes/atomicalign",
"@org_golang_x_tools//go/analysis/passes/bools",
"@org_golang_x_tools//go/analysis/passes/buildssa",
"@org_golang_x_tools//go/analysis/passes/buildtag",
"@org_golang_x_tools//go/analysis/passes/cgocall",
"@org_golang_x_tools//go/analysis/passes/composite",
"@org_golang_x_tools//go/analysis/passes/copylock",
"@org_golang_x_tools//go/analysis/passes/ctrlflow",
"@org_golang_x_tools//go/analysis/passes/deepequalerrors",
"@org_golang_x_tools//go/analysis/passes/errorsas",
"@org_golang_x_tools//go/analysis/passes/findcall",
"@org_golang_x_tools//go/analysis/passes/framepointer",
"@org_golang_x_tools//go/analysis/passes/httpresponse",
"@org_golang_x_tools//go/analysis/passes/ifaceassert",
"@org_golang_x_tools//go/analysis/passes/inspect",
"@org_golang_x_tools//go/analysis/passes/loopclosure",
"@org_golang_x_tools//go/analysis/passes/lostcancel",
"@org_golang_x_tools//go/analysis/passes/nilfunc",
"@org_golang_x_tools//go/analysis/passes/nilness",
"@org_golang_x_tools//go/analysis/passes/pkgfact",
"@org_golang_x_tools//go/analysis/passes/printf",
"@org_golang_x_tools//go/analysis/passes/reflectvaluecompare",
"@org_golang_x_tools//go/analysis/passes/shadow",
"@org_golang_x_tools//go/analysis/passes/shift",
"@org_golang_x_tools//go/analysis/passes/sigchanyzer",
"@org_golang_x_tools//go/analysis/passes/sortslice",
"@org_golang_x_tools//go/analysis/passes/stdmethods",
"@org_golang_x_tools//go/analysis/passes/stringintconv",
"@org_golang_x_tools//go/analysis/passes/structtag",
"@org_golang_x_tools//go/analysis/passes/testinggoroutine",
"@org_golang_x_tools//go/analysis/passes/tests",
"@org_golang_x_tools//go/analysis/passes/unmarshal",
"@org_golang_x_tools//go/analysis/passes/unreachable",
"@org_golang_x_tools//go/analysis/passes/unsafeptr",
"@org_golang_x_tools//go/analysis/passes/unusedresult",
"@org_golang_x_tools//go/analysis/passes/unusedwrite",
"@org_golang_x_tools//go/analysis/passes/usesgenerics",
],
)
# gazelle:prefix aspect.build/cli
# gazelle:exclude **/*.pb.go
# gazelle:resolve go github.com/bazelbuild/buildtools/edit @com_github_bazelbuild_buildtools//edit:go_default_library
# gazelle:resolve go github.com/bazelbuild/buildtools/build @com_github_bazelbuild_buildtools//build:go_default_library
# gazelle-TODO:
# cannot use :map_kind go_proto_library go_proto_library //:go_proto_library.bzl
# because we need gazelle to understand the built-in kind, see https://github.com/bazelbuild/bazel-gazelle/issues/1162
# so instead we are using the aspect-build/rules_go fork which has our write_source_files feature
gazelle(name = "gazelle")
gazelle(
name = "gazelle_update_repos",
args = [
"-build_file_proto_mode=disable_global",
"-from_file=go.mod",
"-to_macro=go.bzl%deps",
"-prune",
],
command = "update-repos",
)
alias(
name = "aspect",
actual = "//cmd/aspect",
)
sh_binary(
name = "tidy",
srcs = ["tidy.sh"],
)
alias(
name = "go",
actual = "@go_sdk//:bin/go",
)
buildifier(
name = "buildifier",
exclude_patterns = ["./.git/*"],
lint_mode = "fix",
mode = "fix",
)
buildifier(
name = "buildifier.check",
exclude_patterns = ["./.git/*"],
lint_mode = "warn",
mode = "diff",
)
alias(
name = "format",
actual = "//tools:format",
)