-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
justfile
81 lines (63 loc) · 1.65 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/env -S just --justfile
_default:
@just --list -u
alias r := ready
# Make sure you have cargo-binstall installed.
# You can download the pre-compiled binary from <https://github.com/cargo-bins/cargo-binstall#installation>
# or install via `cargo install cargo-binstall`
# Initialize the project by installing all the necessary tools.
init:
cargo binstall watchexec-cli typos-cli dprint -y
install:
pnpm install
cd fixtures/pnp && yarn
# When ready, run the same CI commands
ready:
git diff --exit-code --quiet
typos
cargo fmt
just check
just test
just lint
git status
watch *args='':
watchexec {{args}}
watch-check:
just watch "'cargo check; cargo clippy'"
watch-example *args='':
just watch "cargo run --example resolver -- {{args}}"
# Run the example in `parser`, `formatter`, `linter`
example *args='':
cargo run --example resolver -- {{args}}
# Format all files
fmt:
cargo shear --fix # remove all unused dependencies
cargo fmt --all
dprint fmt
# Run cargo check
check:
cargo check --all-features --all-targets
# Run all the tests
test:
cargo test --all-features
# Lint the whole project
lint:
cargo clippy --all-features --all-targets -- --deny warnings
# Generate doc
doc:
RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-features
# Get code coverage
codecov:
cargo codecov --html
# Run the benchmarks.
benchmark:
cargo bench
# Run cargo-fuzz
fuzz:
cd fuzz && cargo +nightly fuzz run --sanitizer none resolver -- -only_ascii=1 -max_total_time=900
# Manual Release
release:
cargo binstall -y release-plz
release-plz update
just check
# NOTE: make sure to update version in npm/package.json