Skip to main content

Module coverage

Module coverage 

Source
Expand description

LCOV-based coverage analysis for change request diffs.

Pure functions that parse LCOV reports, extract changed lines from unified diffs, and classify test coverage severity. No I/O — all inputs are string slices provided by the CLI layer.

classify_coverage_severity is formally verified by Creusot in gh-verify-verif.

Structs§

CoverageAnalysis
Aggregate coverage analysis for the entire change request.
CoverageReport
Parsed coverage report, format-agnostic intermediate representation.
FileAnalysis
Per-file coverage analysis result for change request changed lines.
FileCoverage
Per-file coverage data. Corresponds to one SF..end_of_record block in LCOV.

Enums§

ParseError
LCOV parse error. Explicit enum (no anyhow in core crate).

Functions§

analyze_coverage
Analyze coverage of change request changed lines against a parsed report.
classify_coverage_severity
Classify coverage severity using integer arithmetic (no f64).
extract_changed_lines
Extract added line numbers from a unified diff patch.
parse_lcov
Parse LCOV format content into a CoverageReport.
resolve_path
Check whether an LCOV path (often absolute) matches a change request path (relative).