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
424a6b1d
Commit
424a6b1d
authored
Apr 18, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle files disappearing during analysis (#3390)
parent
29fdc7a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
37 deletions
+36
-37
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+36
-37
No files found.
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
424a6b1d
...
@@ -363,22 +363,14 @@ class AnalyzeCommand extends FlutterCommand {
...
@@ -363,22 +363,14 @@ class AnalyzeCommand extends FlutterCommand {
String
errorMessage
=
groups
[
2
];
String
errorMessage
=
groups
[
2
];
int
lineNumber
=
int
.
parse
(
groups
[
4
]);
int
lineNumber
=
int
.
parse
(
groups
[
4
]);
int
colNumber
=
int
.
parse
(
groups
[
5
]);
int
colNumber
=
int
.
parse
(
groups
[
5
]);
try
{
File
source
=
new
File
(
filename
);
File
source
=
new
File
(
filename
);
List
<
String
>
sourceLines
=
source
.
readAsLinesSync
();
List
<
String
>
sourceLines
=
source
.
readAsLinesSync
();
String
sourceLine
;
try
{
if
(
lineNumber
>
sourceLines
.
length
)
if
(
lineNumber
>
sourceLines
.
length
)
throw
new
FileChanged
();
throw
new
FileChanged
();
sourceLine
=
sourceLines
[
lineNumber
-
1
];
String
sourceLine
=
sourceLines
[
lineNumber
-
1
];
if
(
colNumber
>
sourceLine
.
length
)
if
(
colNumber
>
sourceLine
.
length
)
throw
new
FileChanged
();
throw
new
FileChanged
();
}
on
FileChanged
{
if
(
changedFiles
.
add
(
filename
))
printError
(
'[warning] File shrank during analysis (
$filename
)'
);
sourceLine
=
''
;
lineNumber
=
1
;
colNumber
=
1
;
}
bool
shouldIgnore
=
false
;
bool
shouldIgnore
=
false
;
if
(
documentAllMembersPattern
.
firstMatch
(
errorMessage
)
!=
null
)
{
if
(
documentAllMembersPattern
.
firstMatch
(
errorMessage
)
!=
null
)
{
// https://github.com/dart-lang/linter/issues/207
// https://github.com/dart-lang/linter/issues/207
...
@@ -410,6 +402,13 @@ class AnalyzeCommand extends FlutterCommand {
...
@@ -410,6 +402,13 @@ class AnalyzeCommand extends FlutterCommand {
}
}
if
(
shouldIgnore
)
if
(
shouldIgnore
)
continue
;
continue
;
}
on
FileSystemException
catch
(
exception
)
{
if
(
changedFiles
.
add
(
filename
))
printError
(
'[warning] Could not read file (
${exception.message}${ exception.osError != null ? "; ${exception.osError}
" : ""}) (
$filename
)'
);
}
on
FileChanged
{
if
(
changedFiles
.
add
(
filename
))
printError
(
'[warning] File shrank during analysis (
$filename
)'
);
}
}
}
printError
(
errorLine
);
printError
(
errorLine
);
errorCount
+=
1
;
errorCount
+=
1
;
...
...
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