-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (47 loc) · 1.76 KB
/
Makefile
File metadata and controls
58 lines (47 loc) · 1.76 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
.PHONY: help check test fmt lint doc ci cov cov-report cov-regions install-dev
help:
@echo "Available targets:"
@echo " check Check workspace compiles"
@echo " test Run all tests"
@echo " fmt Format code"
@echo " lint Run clippy with warnings as errors"
@echo " doc Build and open docs in browser"
@echo " cov Generate HTML coverage report and open it"
@echo " cov-report Print uncovered lines"
@echo " cov-regions Print uncovered regions with context"
@echo " ci Run all CI checks locally (fmt, clippy, test, doc)"
@echo " install-dev Install local dev tools (cargo-llvm-cov)"
# Check workspace compiles
check:
cargo check --workspace
# Run all tests
test:
cargo test --workspace
# Format code
fmt:
cargo fmt --all
# Lint
lint:
cargo clippy --workspace -- -D warnings
# Build and open docs in browser
doc:
cargo doc --no-deps -p wavekat-core --all-features --open
# Install local dev tools (run once after cloning)
install-dev:
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov
# Generate HTML coverage report and open it in the browser
cov:
cargo llvm-cov --all-features --open
# Print uncovered lines only (paste into Claude Code to write tests)
cov-report:
@cargo llvm-cov --all-features --text 2>/dev/null | grep -E '\|[[:space:]]+0\|' || echo "No uncovered lines."
# Print uncovered regions with source context (paste into Claude Code to write tests)
cov-regions:
@cargo llvm-cov --all-features --text 2>/dev/null | grep -B1 '\^0' || echo "No uncovered regions."
# Run all CI checks locally (mirrors .github/workflows/ci.yml)
ci:
cargo fmt --all -- --check
cargo clippy --workspace -- -D warnings
cargo test --workspace
cargo doc --no-deps -p wavekat-core --all-features