From bcac1bd5e2a616997ae1de34fdea66f80216b13f Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Tue, 27 Nov 2018 14:44:53 -0800 Subject: [PATCH] Handle the case where there are no missing dartdocs too... (#24801) --- dev/devicelab/bin/tasks/dartdocs.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dev/devicelab/bin/tasks/dartdocs.dart b/dev/devicelab/bin/tasks/dartdocs.dart index 8ce07955bf3..65ff5f6101c 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 {