getSummary method

Implementation

Iterable<SummaryLintReportRecord<Object>> getSummary(
  Iterable<LintFileReport> records,
) =>
    [
      SummaryLintReportRecord<Iterable<String>>(
        title: 'Scanned folders',
        value: scannedFolders(records),
      ),
      SummaryLintReportRecord<int>(
        title: 'Total scanned files',
        value: totalFiles(records),
      ),
      SummaryLintReportRecord<int>(
        title: 'Total lines of source code',
        value: totalSLOC(records),
      ),
      SummaryLintReportRecord<int>(
        title: 'Total classes',
        value: totalClasses(records),
      ),
      SummaryLintReportRecord<num>(
        title: 'Average Cyclomatic Number per line of code',
        value: averageCYCLO(records),
        violations:
            metricViolations(records, CyclomaticComplexityMetric.metricId),
      ),
      SummaryLintReportRecord<int>(
        title: 'Average Source Lines of Code per method',
        value: averageSLOC(records),
        violations:
            metricViolations(records, SourceLinesOfCodeMetric.metricId),
      ),
      SummaryLintReportRecord<String>(
        title: 'Total tech debt',
        value: totalTechDebt(records),
      ),
    ];