diff --git a/dev/devicelab/bin/tasks/dartdocs.dart b/dev/devicelab/bin/tasks/dartdocs.dart index 69dc6a9097..8ce07955bf 100644 --- a/dev/devicelab/bin/tasks/dartdocs.dart +++ b/dev/devicelab/bin/tasks/dartdocs.dart @@ -15,7 +15,7 @@ Future main() async { final Stopwatch clock = Stopwatch()..start(); final Process analysis = await startProcess( path.join(flutterDirectory.path, 'bin', 'flutter'), - ['analyze', '--no-preamble', '--no-congratulate', '--flutter-repo', '--dartdocs'], + ['analyze', '--no-preamble', '--flutter-repo', '--dartdocs'], workingDirectory: flutterDirectory.path, ); int publicMembers = 0; @@ -34,18 +34,24 @@ Future main() async { // ignore this line } 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.startsWith('[lint] ')) { - // ignore this line + if (entry.contains('(ran in ') && !sawFinalLine) { + // ignore this line once + sawFinalLine = true; } else { otherLines += 1; + print('^ not sure what to do with that line ^'); } } final int result = await analysis.exitCode; clock.stop(); + if (!sawFinalLine) + throw Exception('flutter analyze did not output final message'); if (publicMembers == 0 && otherErrors == 0 && result != 0) throw Exception('flutter analyze exited with unexpected error code $result'); if (publicMembers != 0 && otherErrors != 0 && result == 0)