mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Merge pull request #2615 from pq/analyze_cleanup
Analyze command cleanup.
This commit is contained in:
commit
b9f28e6f75
@ -289,7 +289,6 @@ class AnalyzeCommand extends FlutterCommand {
|
|||||||
'--strong',
|
'--strong',
|
||||||
'--package-warnings',
|
'--package-warnings',
|
||||||
'--fatal-warnings',
|
'--fatal-warnings',
|
||||||
'--strong-hints',
|
|
||||||
'--fatal-hints',
|
'--fatal-hints',
|
||||||
// defines lints
|
// defines lints
|
||||||
'--options', optionsFile.path,
|
'--options', optionsFile.path,
|
||||||
@ -340,7 +339,6 @@ class AnalyzeCommand extends FlutterCommand {
|
|||||||
RegExp generalPattern = new RegExp(r'^\[(error|warning|hint|lint)\] (.+) \(([^(),]+), line ([0-9]+), col ([0-9]+)\)$');
|
RegExp generalPattern = new RegExp(r'^\[(error|warning|hint|lint)\] (.+) \(([^(),]+), line ([0-9]+), col ([0-9]+)\)$');
|
||||||
RegExp allowedIdentifiersPattern = new RegExp(r'_?([A-Z]|_+)\b');
|
RegExp allowedIdentifiersPattern = new RegExp(r'_?([A-Z]|_+)\b');
|
||||||
RegExp constructorTearOffsPattern = new RegExp('.+#.+// analyzer doesn\'t like constructor tear-offs');
|
RegExp constructorTearOffsPattern = new RegExp('.+#.+// analyzer doesn\'t like constructor tear-offs');
|
||||||
RegExp ignorePattern = new RegExp(r'// analyzer says "([^"]+)"');
|
|
||||||
RegExp conflictingNamesPattern = new RegExp('^The imported libraries \'([^\']+)\' and \'([^\']+)\' cannot have the same name \'([^\']+)\'\$');
|
RegExp conflictingNamesPattern = new RegExp('^The imported libraries \'([^\']+)\' and \'([^\']+)\' cannot have the same name \'([^\']+)\'\$');
|
||||||
RegExp missingFilePattern = new RegExp('^Target of URI does not exist: \'([^\')]+)\'\$');
|
RegExp missingFilePattern = new RegExp('^Target of URI does not exist: \'([^\')]+)\'\$');
|
||||||
|
|
||||||
@ -394,14 +392,6 @@ class AnalyzeCommand extends FlutterCommand {
|
|||||||
shouldIgnore = true;
|
shouldIgnore = true;
|
||||||
} else if (constructorTearOffsPattern.allMatches(sourceLine).isNotEmpty) {
|
} else if (constructorTearOffsPattern.allMatches(sourceLine).isNotEmpty) {
|
||||||
shouldIgnore = true;
|
shouldIgnore = true;
|
||||||
} else {
|
|
||||||
Iterable<Match> ignoreGroups = ignorePattern.allMatches(sourceLine);
|
|
||||||
for (Match ignoreGroup in ignoreGroups) {
|
|
||||||
if (errorMessage.contains(ignoreGroup[1])) {
|
|
||||||
shouldIgnore = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (shouldIgnore)
|
if (shouldIgnore)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user