totalSLOC function

int totalSLOC(
  1. Iterable<LintFileReport> records
)

Implementation

int totalSLOC(Iterable<LintFileReport> records) => records.fold(
      0,
      (prevValue, fileReport) =>
          prevValue +
          fileReport.functions.values.fold(
            0,
            (prevValue, functionReport) =>
                prevValue +
                (functionReport
                        .metric(SourceLinesOfCodeMetric.metricId)
                        ?.value
                        .toInt() ??
                    0),
          ),
    );