Skip to main content

parse_lcov

Function parse_lcov 

Source
pub fn parse_lcov(content: &str) -> HashMap<PathBuf, FileCoverage>
Expand description

Parse an LCOV .info file and return a map from source file path to coverage metrics.

Paths in the map are normalised to forward-slash separators and stored as-is from the SF: record — callers are responsible for matching against FileRecord.relative_path.

Both the summary records (LF/LH/FNF/FNH/BRF/BRH) and the raw per-line records (DA:/FN:/FNDA:/BRDA:) are understood. When a summary record is absent, the corresponding value is derived from the raw records so files that ship only raw data still report accurate coverage.