-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
44 lines (36 loc) · 837 Bytes
/
justfile
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
default:
@just --list
check:
just fmt --check
just lint
just test
fmt check="":
if [[ "{{check}}" == "--check" ]]; then \
just fmt-rust --check; \
just fmt-nix --check; \
just fmt-dprint --diff; \
else \
just fmt-rust; \
just fmt-nix; \
just fmt-dprint; \
fi
fmt-rust *flags:
cargo fmt {{flags}}
fmt-nix *flags:
find . -type f -iname '*.nix' | xargs nixpkgs-fmt {{flags}}
fmt-dprint *flags:
dprint fmt {{flags}}
lint watch="":
if [[ "{{watch}}" == "--watch" ]]; then \
cargo watch -w src -x clippy; \
else \
cargo clippy; \
fi
test watch="":
if [[ "{{watch}}" == "--watch" ]]; then \
cargo watch -w src -x 'test --locked --frozen --all-features -- --nocapture'; \
else \
cargo test --locked --frozen --all-features -- --nocapture; \
fi
build:
cargo build