-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
61 lines (54 loc) · 1.23 KB
/
BUILD.bazel
File metadata and controls
61 lines (54 loc) · 1.23 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
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
# --- Filegroups for sources ---
filegroup(
name = "rust_sources",
srcs = glob(
["src/**/*.rs",
"Cargo.toml",
"Cargo.lock"],
allow_empty = True,
),
)
# --- Prettier ---
sh_binary(
name = "prettier_check",
srcs = ["tools/prettier.sh"],
args = ["--check"],
)
sh_binary(
name = "prettier_fix",
srcs = ["tools/prettier.sh"],
args = ["--write"],
)
# --- Rust fmt ---
sh_binary(
name = "rust_fmt_check",
srcs = ["tools/rustfmt.sh"],
data = [":rust_sources"],
args = ["--all", "--", "--check"],
)
sh_binary(
name = "rust_fmt_fix",
srcs = ["tools/rustfmt.sh"],
data = [":rust_sources"],
args = ["--all"],
)
# --- Clippy ---
sh_binary(
name = "clippy_check",
srcs = ["tools/clippy.sh"],
data = [":rust_sources"],
args = ["--all-targets", "--all-features", "--", "-D", "warnings"],
)
sh_binary(
name = "clippy_fix",
srcs = ["tools/clippy.sh"],
data = [":rust_sources"],
args = ["--all-targets", "--all-features", "--fix", "--allow-dirty", "--allow-staged"],
)
# --- Rust tests ---
sh_binary(
name = "rust_tests",
srcs = ["tools/rust_tests.sh"],
data = [":rust_sources"],
args = ["--all-features", "--verbose"],
)