-
-
Notifications
You must be signed in to change notification settings - Fork 228
Expand file tree
/
Copy pathrules.bzl
More file actions
33 lines (31 loc) · 1.06 KB
/
rules.bzl
File metadata and controls
33 lines (31 loc) · 1.06 KB
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
"""
Periphery public rules.
"""
load("//bazel/internal/scan:scan.bzl", "force_indexstore", "scan_impl", "scan_inputs_aspect")
scan = rule(
doc = "Scans the top-level deps and their transitive deps for unused code.",
attrs = {
"deps": attr.label_list(
cfg = force_indexstore,
mandatory = True,
aspects = [scan_inputs_aspect],
doc = "Top-level project targets to scan.",
),
"config": attr.string(doc = "Path to the periphery.yml configuration file."),
"global_indexstore": attr.string(doc = "Path to a global index store."),
"periphery": attr.label(
doc = "The periphery executable target.",
default = "@periphery//:periphery",
),
"_template": attr.label(
allow_single_file = True,
default = "@periphery//bazel/internal/scan:scan_template.sh",
),
},
outputs = {
"project_config": "project_config.json",
"scan": "scan.sh",
},
implementation = scan_impl,
executable = True,
)