chore: add local test coverage via cargo-llvm-cov#17
Merged
Conversation
Add `make coverage` / `coverage-html` / `coverage-lcov` targets backed by cargo-llvm-cov. Coverage is a local-only, on-demand tool — it is not wired into CI and is not part of `make check`. Document the targets and one-time setup in CLAUDE.md, and git-ignore the generated lcov.info. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the standalone Coverage section; mention the targets in one line alongside the other make targets, matching how `test` is listed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add on-demand local test-coverage tooling backed by
cargo-llvm-cov.New Makefile targets:
make coverage— per-file coverage summary in the terminalmake coverage-html— HTML report undertarget/llvm-cov/html/index.htmlmake coverage-lcov— emitlcov.infofor external toolingScope / non-goals
Coverage is local-only and on-demand: it is intentionally not wired into CI and not part of
make check, so it never gates merges. One-time setup iscargo install cargo-llvm-cov+rustup component add llvm-tools-preview(documented in CLAUDE.md).Also
.gitignore: ignore the generatedlcov.infoCLAUDE.md: document the targets, the one-time setup, and that coverage is not a CI gateInitial numbers (baseline)
Line coverage 69.33% overall (regions 68.53%, functions 78.10%). Most modules sit at 80–98%; the main outlier is
tui/mod.rsat ~15% (the interactive event loop, which is hard to unit-test) — it accounts for the bulk of the uncovered lines.🤖 Generated with Claude Code