Unverified Commit f0dd4ad5 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] add more info to coverage script (#64065)

Also output covered | total lines, and a summary percentage at the end + Kick tree
parent 61362cff
...@@ -38,10 +38,16 @@ void main(List<String> args) { ...@@ -38,10 +38,16 @@ void main(List<String> args) {
final double rightPercent = right.testedLines / right.totalLines; final double rightPercent = right.testedLines / right.totalLines;
return leftPercent.compareTo(rightPercent); return leftPercent.compareTo(rightPercent);
}); });
double overallNumerator = 0;
double overallDenominator = 0;
print('% | tested | total');
for (final Coverage coverage in coverages) { for (final Coverage coverage in coverages) {
overallNumerator += coverage.testedLines;
overallDenominator += coverage.totalLines;
final String coveragePercent = (coverage.testedLines / coverage.totalLines * 100).toStringAsFixed(2); final String coveragePercent = (coverage.testedLines / coverage.totalLines * 100).toStringAsFixed(2);
print('${coverage.library}: $coveragePercent%'); print('${coverage.library}: $coveragePercent% | ${coverage.testedLines} | ${coverage.totalLines}');
} }
print('OVERALL: ${overallNumerator/overallDenominator}');
} }
class Coverage { class Coverage {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment