mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Merge pull request #3245 from pq/lint_fixes
Analyze Command lint cleanup.
This commit is contained in:
commit
9b2d2ad9d2
@ -344,11 +344,10 @@ 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 classesWithOptionalTypeArgumentsPattern = new RegExp(r'\b(GlobalKey|State|ScrollableState|Element|StatelessElement|TypeMatcher)\b');
|
||||
RegExp conflictingNamesPattern = new RegExp('^The imported libraries \'([^\']+)\' and \'([^\']+)\' cannot have the same name \'([^\']+)\'\$');
|
||||
RegExp missingFilePattern = new RegExp('^Target of URI does not exist: \'([^\')]+)\'\$');
|
||||
RegExp documentAllMembersPattern = new RegExp('^Document all public memm?bers\$');
|
||||
RegExp documentAllMembersPattern = new RegExp('^Document all public members\$');
|
||||
|
||||
Set<String> changedFiles = new Set<String>(); // files about which we've complained that they changed
|
||||
|
||||
@ -407,9 +406,6 @@ class AnalyzeCommand extends FlutterCommand {
|
||||
} else if (sourceLines.first.startsWith('// DO NOT EDIT. This is code generated')) {
|
||||
// autogenerated code - TODO(ianh): Fix the intl package resource generator
|
||||
shouldIgnore = true;
|
||||
} else if (level == 'lint' && errorMessage == 'Name non-constant identifiers using lowerCamelCase.') {
|
||||
if (allowedIdentifiersPattern.matchAsPrefix(sourceLine, colNumber-1) != null)
|
||||
shouldIgnore = true;
|
||||
} else if (level == 'lint' && errorMessage == 'Specify type annotations.') {
|
||||
// we want the type annotations on certain classes to be optional.
|
||||
// see https://github.com/dart-lang/linter/issues/196
|
||||
|
Loading…
Reference in New Issue
Block a user