forked from kpcyrd/acme-micro
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
55 lines (45 loc) · 1.87 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
import '.toolchain/rust.just'
_list:
@just --list
# Check project
check:
just --unstable --fmt --check
fd --hidden --extension=md --extension=yml --exec-batch prettier --check
fd --hidden --extension=toml --exec-batch taplo format --check
fd --hidden --extension=toml --exec-batch taplo lint
cargo +nightly fmt -- --check
cargo machete --with-metadata
# Format project
fmt:
just --unstable --fmt
nixpkgs-fmt .
fd --hidden --extension=md --extension=yml --exec-batch prettier --write
fd --hidden --extension=toml --exec-batch taplo format
cargo +nightly fmt
# Lint workspace with Clippy
clippy:
cargo clippy --workspace --no-default-features
cargo clippy --workspace --all-features
# Test workspace without generating coverage files
[private]
test-no-coverage toolchain="":
cargo {{ toolchain }} nextest run --workspace --no-default-features
cargo {{ toolchain }} nextest run --workspace --all-features
cargo {{ toolchain }} test --doc --workspace --all-features
RUSTDOCFLAGS="-D warnings" cargo {{ toolchain }} doc --workspace --no-deps --all-features
# Test workspace and generate coverage files
test toolchain="": (test-no-coverage toolchain)
@just test-coverage-codecov {{ toolchain }}
@just test-coverage-lcov {{ toolchain }}
# Test workspace and generate Codecov coverage file
test-coverage-codecov toolchain="":
cargo {{ toolchain }} llvm-cov --workspace --all-features --codecov --output-path codecov.json
# Test workspace and generate LCOV coverage file
test-coverage-lcov toolchain="":
cargo {{ toolchain }} llvm-cov --workspace --all-features --lcov --output-path lcov.info
# Document workspace
doc *args:
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --all-features {{ args }}
# Document workspace and watch for changes
doc-watch: (doc "--open")
cargo watch -- just doc