diff --git a/dev/devicelab/bin/tasks/dartdocs.dart b/dev/devicelab/bin/tasks/dartdocs.dart index 8ce07955bf..65ff5f6101 100644 --- a/dev/devicelab/bin/tasks/dartdocs.dart +++ b/dev/devicelab/bin/tasks/dartdocs.dart @@ -21,6 +21,7 @@ Future main() async { int publicMembers = 0; int otherErrors = 0; int otherLines = 0; + bool sawFinalLine = false; await for (String entry in analysis.stdout.transform(utf8.decoder).transform(const LineSplitter())) { entry = entry.trim(); print('analyzer stdout: $entry'); @@ -30,17 +31,17 @@ Future 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(utf8.decoder).transform(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 {