Skip to main content

check_rust

Function check_rust 

Source
pub fn check_rust(
    root: &Path,
    base: &str,
    exclude: &[String],
) -> Result<Vec<Uncovered>>
Expand description

Every line added or modified in root’s <base>...HEAD diff that the Rust unit suite (cargo llvm-cov) doesn’t cover, sorted for deterministic output. exclude is the coverage-rule exemptions (as in crate::coverage::measure_rust) — an excluded file is dropped from the run, so its changed lines are lifted.

The Rust twin of check (#136), built on the Rust coverage rule (#37): reuses the same <base>...HEAD diff machinery (changed_lines), scoped to .rs sources, and maps the changed lines against cargo llvm-cov’s per-line coverage (crate::coverage::measure_patch_rust). Returns early — with no coverage run — when the diff touches no Rust source, so a PR that changes only docs or other languages doesn’t pay for a measurement. Requires cargo-llvm-cov

  • git; an unresolvable base surfaces as an error rather than a silent pass.