Skip to main content

measure_rust

Function measure_rust 

Source
pub fn measure_rust(
    root: &Path,
    base: &str,
    thresholds: RustThresholds,
    ignore: &[String],
) -> Result<Outcome>
Expand description

Diff-scoped Rust coverage floor (#162): the cargo llvm-cov regions/lines metrics measured over the <base>...HEAD changed .rs lines instead of the whole tree. ignore is the coverage-rule exemptions, as in crate::coverage::measure_rust — an exempt file is dropped from the run, so its changed lines drop out of the ratios.

Scopes to .rs sources and returns early — with no coverage run — when the diff touches none, so a PR that changes only docs or other languages doesn’t pay for a measurement (and is vacuously covered). Requires cargo-llvm-cov + git; an unresolvable base surfaces as an error rather than a silent pass.