Skip to main content

evaluate_code_health_gate

Function evaluate_code_health_gate 

pub fn evaluate_code_health_gate(
    thresholds: &Thresholds,
    code_health: &[CodeHealthRow],
) -> Vec<GateViolation>
Expand description

Evaluate the code_health_min gate against the COMPOSITE code-health score (run_code_health), not the hotspots inline cognitive-only proxy. This is the score --analysis code-health reports, so a file the analysis bands red is the file the gate flags — the two agree.

Kept separate from evaluate_full_tree (which evaluates the genuinely hotspot-scoped cognitive_max / hotspot_score_max gates) because code_health_min is a property of the code-health analysis, whose file set (files with complexity data) differs from the hotspots file set.