| Index: lib/src/report.dart
|
| diff --git a/lib/src/report.dart b/lib/src/report.dart
|
| index 26c27b1a169bb28aa05998b3c3735542b3878c52..f76d61fd4b5344f54abbf92823c8a2a18f320123 100644
|
| --- a/lib/src/report.dart
|
| +++ b/lib/src/report.dart
|
| @@ -198,7 +198,10 @@ String summaryToString(GlobalSummary summary) {
|
| // Declare columns and add header
|
| table.declareColumn('package');
|
| table.declareColumn('AnalyzerError', abbreviate: true);
|
| - infoTypes.forEach((type) => table.declareColumn('$type', abbreviate: true));
|
| + var activeInfoTypes =
|
| + infoTypes.where((type) => counter.totals['$type'] != null);
|
| + activeInfoTypes
|
| + .forEach((type) => table.declareColumn('$type', abbreviate: true));
|
| table.declareColumn('LinesOfCode', abbreviate: true);
|
| table.addHeader();
|
|
|
| @@ -207,7 +210,8 @@ String summaryToString(GlobalSummary summary) {
|
| for (var package in counter.errorCount.keys) {
|
| appendCount(package);
|
| appendCount(counter.errorCount[package]['AnalyzerError']);
|
| - infoTypes.forEach((e) => appendCount(counter.errorCount[package]['$e']));
|
| + activeInfoTypes
|
| + .forEach((e) => appendCount(counter.errorCount[package]['$e']));
|
| appendCount(counter.linesOfCode[package]);
|
| }
|
|
|
| @@ -216,7 +220,7 @@ String summaryToString(GlobalSummary summary) {
|
| table.addHeader();
|
| table.addEntry('total');
|
| appendCount(counter.totals['AnalyzerError']);
|
| - infoTypes.forEach((type) => appendCount(counter.totals['$type']));
|
| + activeInfoTypes.forEach((type) => appendCount(counter.totals['$type']));
|
| appendCount(counter.totalLinesOfCode);
|
|
|
| appendPercent(count, total) {
|
| @@ -228,7 +232,8 @@ String summaryToString(GlobalSummary summary) {
|
| var totalLOC = counter.totalLinesOfCode;
|
| table.addEntry('%');
|
| appendPercent(counter.totals['AnalyzerError'], totalLOC);
|
| - infoTypes.forEach((type) => appendPercent(counter.totals['$type'], totalLOC));
|
| + activeInfoTypes
|
| + .forEach((type) => appendPercent(counter.totals['$type'], totalLOC));
|
| appendCount(100);
|
|
|
| return table.toString();
|
|
|