-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathjustfile
More file actions
54 lines (42 loc) · 1.11 KB
/
justfile
File metadata and controls
54 lines (42 loc) · 1.11 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
# List all just receipes
default:
@just --list --unsorted
# Install requirement for recipes
requirement:
cargo install cargo-watch
cargo install cargo-nextest
cargo install cargo-llvm-cov
cargo install cargo-sort
cargo install cargo-deny
cargo install cargo-hack
# Format the code and sort dependencies
format:
cargo fmt
cargo sort --workspace --grouped
_check_format:
cargo fmt --all -- --check
cargo sort --workspace --grouped --check
deny:
cargo deny check advisories
cargo deny check bans licenses sources
# Lint the rust code
lint:
cargo clippy --workspace --all-features --all-targets -- --deny warnings --allow deprecated
# Launch tests
test:
cargo nextest run
cargo test --doc
# Test with features combination
test-with-features:
cargo hack check --each-feature --no-dev-deps
# Check code coverage
coverage:
cargo llvm-cov --open
# Check the code (formatting, lint, and tests)
check: && _check_format lint test
# Run TDD mode
tdd:
cargo watch -c -s "just check"
# Build documentation (rustdoc, book)
doc:
cargo doc --all-features --no-deps