-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
66 lines (53 loc) · 1.78 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
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
# run the test suite
[group("code coverage")]
test profile='default':
cargo llvm-cov --no-report \
nextest --manifest-path cpp-linter/Cargo.toml \
--lib --tests --color always --profile {{ profile }}
# Clear previous test build artifacts
[group("code coverage")]
test-clean:
cargo llvm-cov clean
# generate and open pretty coverage report
[group("code coverage")]
pretty-cov *args='':
cargo llvm-cov report --json --output-path coverage.json --ignore-filename-regex main
llvm-cov-pretty coverage.json {{ args }}
# generate and open detailed coverage report
[group("code coverage")]
llvm-cov *args='':
cargo llvm-cov report --html --ignore-filename-regex main {{ args }}
# This is useful for IDE gutter indicators of line coverage.
# See Coverage Gutters ext in VSCode.
# generate lcov.info
[group("code coverage")]
lcov:
cargo llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex main
# serve docs
[group("docs")]
docs open='':
mkdocs serve --config-file docs/mkdocs.yml {{ open }}
# build docs
[group("docs")]
docs-build:
mkdocs build --config-file docs/mkdocs.yml
# rust docs
[group("docs")]
docs-rs open='':
cargo doc --no-deps --lib --manifest-path cpp-linter/Cargo.toml {{ open }}
# run cpp-linter native binary
[group("bin")]
run *args:
cargo run --bin cpp-linter --manifest-path cpp-linter/Cargo.toml -- {{ args }}
# build the native binary
[group("bin")]
build *args='':
cargo build --bin cpp-linter --manifest-path cpp-linter/Cargo.toml {{ args }}
# run clippy and rustfmt
lint:
cargo clippy --allow-staged --allow-dirty --fix
cargo fmt
# bump version in root Cargo.toml
bump component='patch':
@python .github/workflows/bump_version.py {{ component }}