-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
67 lines (55 loc) · 2.16 KB
/
justfile
File metadata and controls
67 lines (55 loc) · 2.16 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
62
63
64
65
66
67
_list:
@just --list
toolchain := ""
msrv := ```
cargo metadata --format-version=1 \
| jq -r 'first(.packages[] | select(.source == null and .rust_version)) | .rust_version' \
| sed -E 's/^1\.([0-9]{2})$/1\.\1\.0/'
```
msrv_rustup := "+" + msrv
# Check project.
check: && clippy
just --unstable --fmt --check
fd --hidden -e=md -e=yml --exec-batch prettier --check
fd --hidden -e=toml --exec-batch taplo format --check
fd --hidden -e=toml --exec-batch taplo lint
cargo +nightly fmt -- --check
# Format project.
fmt:
just --unstable --fmt
fd --hidden -e=md -e=yml --exec-batch prettier --write
fd --hidden -e=toml --exec-batch taplo format
cargo +nightly fmt
[private]
downgrade-for-msrv:
# no downgrades currently necessary
# Clippy check workspace.
clippy:
cargo clippy --workspace --no-default-features
cargo clippy --workspace --all-features
cargo hack --feature-powerset --depth=3 clippy --workspace
# Run workspace test suite.
test:
cargo {{ toolchain }} nextest run
cargo {{ toolchain }} test --doc
RUSTDOCFLAGS="-D warnings" cargo {{ toolchain }} doc --workspace --no-deps --all-features
# Run workspace test suite using MSRV.
test-msrv:
@just toolchain={{ msrv_rustup }} test
# Run workspace test suite, capturing coverage.
test-coverage:
@just test-coverage-codecov {{ toolchain }}
@just test-coverage-lcov {{ toolchain }}
# Run workspace test suite, capturing coverage info in Codecov format.
test-coverage-codecov:
cargo {{ toolchain }} llvm-cov --workspace --all-features --codecov --output-path codecov.json
# Run workspace test suite, capturing coverage info in Lcov format.
test-coverage-lcov:
cargo {{ toolchain }} llvm-cov --workspace --all-features --lcov --output-path lcov.info
# Build workspace documentation.
doc:
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --all-features
# Build workspace documentation, open it, and watch for changes.
doc-watch:
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --all-features --open
cargo watch -- RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --all-features