-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
executable file
·42 lines (32 loc) · 877 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
#!/usr/bin/env just --justfile
# Formats and checks the code
all: format check
ci: _add-target format check
[private]
alias a := all
[private]
alias c := check
[private]
alias f := format
# Adds the target for CI
_add-target:
rustup target add aarch64-unknown-linux-gnu
# Run clippy and formatter
check: _c-clippy _c-fmt
_c-clippy:
cargo clippy -j4 --all-targets -- -D warnings
_c-fmt: update-nightly-fmt
cargo +nightly-2023-12-07 fmt --all -- --check
_c-fix:
cargo fix --workspace
# Format the code
format: update-nightly-fmt
cargo +nightly-2023-12-07 fmt --all
clean:
cargo clean
# Fix clippy warnings and format the code.
fix: _c-fix format
# Installs/updates the nightly rustfmt installation
update-nightly-fmt:
rustup toolchain install --profile minimal nightly-2023-12-07 --no-self-update
rustup component add rustfmt --toolchain nightly-2023-12-07