Skip to main content

classify_coverage_severity

Function classify_coverage_severity 

Source
pub fn classify_coverage_severity(
    covered: usize,
    total: usize,
    warn_pct: usize,
    error_pct: usize,
) -> Severity
Expand description

Classify coverage severity using integer arithmetic (no f64).

Matches the Creusot predicate in gh-verify-verif:

  • total == 0 => Pass (no changed lines to cover)
  • covered * 100 > warn_pct * total => Pass
  • covered * 100 > error_pct * total => Warning
  • otherwise => Error