maxMetricViolationLevel function
Implementation
MetricValueLevel maxMetricViolationLevel(Iterable<LintFileReport> records) =>
records
.expand(
(record) => [...record.classes.values, ...record.functions.values]
.map((report) => report.metricsLevel),
)
.maxOrNull ??
MetricValueLevel.none;