Unverified Commit 7875c803 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_tools] add test debugging for #111272 (#111280)

parent a1dbd0cc
...@@ -3120,11 +3120,16 @@ Future<void> _analyzeProject(String workingDir, { List<String> expectedFailures ...@@ -3120,11 +3120,16 @@ Future<void> _analyzeProject(String workingDir, { List<String> expectedFailures
} }
expect(exec.exitCode, isNot(0)); expect(exec.exitCode, isNot(0));
String lineParser(String line) { String lineParser(String line) {
try {
final String analyzerSeparator = globals.platform.isWindows ? ' - ' : ' • '; final String analyzerSeparator = globals.platform.isWindows ? ' - ' : ' • ';
final List<String> lineComponents = line.trim().split(analyzerSeparator); final List<String> lineComponents = line.trim().split(analyzerSeparator);
final String lintName = lineComponents.removeLast(); final String lintName = lineComponents.removeLast();
final String location = lineComponents.removeLast(); final String location = lineComponents.removeLast();
return '$location: $lintName'; return '$location: $lintName';
// Add debugging for https://github.com/flutter/flutter/issues/111272
} on RangeError catch (err) {
fail('Received "$err" while trying to parse:\n\n$line');
}
} }
final List<String> errors = const LineSplitter().convert(exec.stdout.toString()) final List<String> errors = const LineSplitter().convert(exec.stdout.toString())
.where((String line) { .where((String line) {
......
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