Expand description
Diff/patch coverage analysis.
Ingests a per-line coverage report (lcov / llvm-cov JSON / cobertura) plus a git diff and produces PR-attributable coverage: patch coverage (the fraction of lines the diff added that are covered), the explicit list of uncovered new lines, project before/after deltas, and indirect coverage flips on unchanged lines.
Pipeline:
format::parseturns report text into a per-linemodel::CoverageReport.diff::DiffModel::betweenbuilds the added-line sets and base↔head alignment fromgit2.analysis::analyzeattributes coverage to the diff.render::renderemits markdown / YAML / JSON.
Re-exports§
pub use analysis::analyze;pub use analysis::CoverageDiff;pub use analysis::DiffScope;pub use diff::default_base_ref;pub use diff::DiffModel;pub use format::parse;pub use format::Format;pub use model::CoverageReport;pub use model::FileCoverage;pub use render::render;pub use render::OutputFormat;pub use render::RenderOptions;
Modules§
- analysis
- Coverage attribution: combine a head per-line report with a
DiffModel(and optionally a baseline report) into the metrics a reviewer wants. - cobertura
- Cobertura XML coverage parser (line coverage only).
- diff
- Unified-diff model built from
git2. - format
- Coverage report format detection and parse dispatch.
- lcov
- lcov trace-file parser (line coverage only).
- llvm_
json - llvm-cov JSON export parser (
cargo llvm-cov report --json). - model
- The per-line coverage model that every parser produces.
- render
- Rendering of a
CoverageDiffto markdown, YAML, or JSON.