Re-added conflictingNamesPattern.
This commit is contained in:
parent
aedef5139b
commit
a2dac85f87
@ -339,6 +339,7 @@ class AnalyzeCommand extends FlutterCommand {
|
||||
RegExp generalPattern = new RegExp(r'^\[(error|warning|hint|lint)\] (.+) \(([^(),]+), line ([0-9]+), col ([0-9]+)\)$');
|
||||
RegExp allowedIdentifiersPattern = new RegExp(r'_?([A-Z]|_+)\b');
|
||||
RegExp constructorTearOffsPattern = new RegExp('.+#.+// analyzer doesn\'t like constructor tear-offs');
|
||||
RegExp conflictingNamesPattern = new RegExp('^The imported libraries \'([^\']+)\' and \'([^\']+)\' cannot have the same name \'([^\']+)\'\$');
|
||||
RegExp missingFilePattern = new RegExp('^Target of URI does not exist: \'([^\')]+)\'\$');
|
||||
|
||||
Set<String> changedFiles = new Set<String>(); // files about which we've complained that they changed
|
||||
@ -371,8 +372,11 @@ class AnalyzeCommand extends FlutterCommand {
|
||||
}
|
||||
bool shouldIgnore = false;
|
||||
if (filename == mainFile.path) {
|
||||
Match libs = conflictingNamesPattern.firstMatch(errorMessage);
|
||||
Match missing = missingFilePattern.firstMatch(errorMessage);
|
||||
if (missing != null) {
|
||||
if (libs != null) {
|
||||
errorLine = '[$level] $errorMessage (${dartFiles[lineNumber-1]})'; // strip the reference to the generated main.dart
|
||||
} else if (missing != null) {
|
||||
errorLine = '[$level] File does not exist (${missing[1]})';
|
||||
} else {
|
||||
errorLine += ' (Please file a bug on the "flutter analyze" command saying that you saw this message.)';
|
||||
|
Loading…
x
Reference in New Issue
Block a user