Skip to main content

lookup

Function lookup 

Source
pub fn lookup(id: &str) -> Option<&'static MetricInfo>
Expand description

Catalog entry for a known offender id, or None. Callers pick their own fallback for unknown ids (SARIF emits the raw id; Code Climate falls through to its default message).

Public so out-of-crate consumers (the CLI threshold engine) can read a metric’s Direction — the mi.* family is lower-is-worse, so the gate and the offender wording must consult it rather than assuming a higher value is always the violation (#698).