Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ba918fea
Commit
ba918fea
authored
Feb 27, 2016
by
Hixie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flutter analyze: handle missing files
parent
b18047bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+4
-0
No files found.
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
ba918fea
...
...
@@ -361,6 +361,7 @@ linter:
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
missingFilePattern
=
new
RegExp
(
'^Target of URI does not exist:
\'
([^
\'
)]+)
\'
\$
'
);
Set
<
String
>
changedFiles
=
new
Set
<
String
>();
// files about which we've complained that they changed
...
...
@@ -393,8 +394,11 @@ linter:
bool
shouldIgnore
=
false
;
if
(
filename
==
mainFile
.
path
)
{
Match
libs
=
conflictingNamesPattern
.
firstMatch
(
errorMessage
);
Match
missing
=
missingFilePattern
.
firstMatch
(
errorMessage
);
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.)'
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment