pub fn threshold_metric_for_name(name: &str) -> Option<Metric>Expand description
Resolve a sub-metric threshold name (e.g. cyclomatic.modified,
halstead.volume, loc.lloc) to its parent Metric.
The threshold engine uses dotted forms to address individual
sub-metrics, but suppression markers only know about the top-level
metric family — silencing halstead silences all of
halstead.volume, halstead.effort, etc. This translation happens
here so the threshold-check loop can ask one question (“does this
scope cover this metric family?”) instead of special-casing each
dotted name.
Returns None for tokens: it has no configurable threshold and is
deliberately absent from the suppressible vocabulary
(Metric::suppressible), so a marker can never silence it.