Handle the case where there are no missing dartdocs too... (#24801)

This commit is contained in:
Ian Hickson 2018-11-27 14:44:53 -08:00 committed by GitHub
parent 9ca129d791
commit bcac1bd5e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,7 @@ Future<void> main() async {
int publicMembers = 0;
int otherErrors = 0;
int otherLines = 0;
bool sawFinalLine = false;
await for (String entry in analysis.stdout.transform<String>(utf8.decoder).transform<String>(const LineSplitter())) {
entry = entry.trim();
print('analyzer stdout: $entry');
@ -30,17 +31,17 @@ Future<void> main() async {
publicMembers += 1;
} else if (entry.startsWith('info •') || entry.startsWith('warning •') || entry.startsWith('error •')) {
otherErrors += 1;
} else if (entry.contains(' (ran in ')) {
// ignore this line
} else if (entry.contains(' (ran in ') && !sawFinalLine) {
// ignore this line once
sawFinalLine = true;
} else if (entry.isNotEmpty) {
otherLines += 1;
print('^ not sure what to do with that line ^');
}
}
bool sawFinalLine = false;
await for (String entry in analysis.stderr.transform<String>(utf8.decoder).transform<String>(const LineSplitter())) {
print('analyzer stderr: $entry');
if (entry.contains('(ran in ') && !sawFinalLine) {
if (entry.contains(' (ran in ') && !sawFinalLine) {
// ignore this line once
sawFinalLine = true;
} else {