Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/target

# Coverage artifacts (cargo-llvm-cov)
/lcov.info

*.swp
*.swo
*~
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This project uses a `Makefile` as the **single source of truth** for build, form
- `make build` — `cargo build --all-targets`
- `make check` — `fmt-check` + `lint` + `test` (run this before declaring work done or pushing)
- `make all` — `fmt` + `check` + `build`
- `make coverage` — local test-coverage summary via `cargo-llvm-cov` (also `coverage-html` / `coverage-lcov`; on-demand, not a CI gate, not part of `make check`)

### Required workflow before finishing any code change

Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help fmt fmt-check lint test build build-release check all
.PHONY: help fmt fmt-check lint test build build-release check all coverage coverage-html coverage-lcov

CARGO ?= cargo

Expand All @@ -12,6 +12,9 @@ help:
@echo " build-release - cargo build --release"
@echo " check - fmt-check + lint + test (run before pushing)"
@echo " all - fmt + check + build"
@echo " coverage - test coverage summary in the terminal (cargo-llvm-cov)"
@echo " coverage-html - generate an HTML coverage report under target/llvm-cov/html"
@echo " coverage-lcov - emit lcov.info for external tooling"

fmt:
$(CARGO) fmt --all
Expand All @@ -34,3 +37,12 @@ build-release:
check: fmt-check lint test

all: fmt check build

coverage:
$(CARGO) llvm-cov --all-targets

coverage-html:
$(CARGO) llvm-cov --all-targets --html

coverage-lcov:
$(CARGO) llvm-cov --all-targets --lcov --output-path lcov.info
Loading