maxMetricViolationLevel function

MetricValueLevel maxMetricViolationLevel(
  1. Iterable<LintFileReport> records
)

Implementation

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