Skip to main content

Module coverage

Module coverage 

Source

Structs§

FileCoverage
Per-file coverage metrics parsed from an LCOV .info file.

Functions§

aggregate_line_coverage
Compute a weighted-average line coverage percentage across all files that have coverage data. Returns None if no files have coverage data or if total lines_found is zero.
lookup_coverage
Attempt to match a FileRecord’s relative_path against the coverage map.
parse_cobertura
Parse a Cobertura XML coverage file (coverage.xml) into a per-file coverage map.
parse_coverage_auto
Auto-detect coverage file format from path extension and content, then dispatch to the appropriate parser. Falls back to LCOV for unknown extensions.
parse_istanbul
Parse an Istanbul/NYC coverage-summary.json file into a per-file coverage map.
parse_jacoco
Parse a JaCoCo XML report (jacoco.xml) into a per-file coverage map.
parse_lcov
Parse an LCOV .info file and return a map from source file path to coverage metrics.
resolve_coverage_file
Resolve a coverage file path from the environment variable SLOC_COVERAGE_FILE or the provided config path, normalising to an absolute PathBuf.