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
6d2d4953
Commit
6d2d4953
authored
Jun 06, 2016
by
Phil Quitslund
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4348 from pq/fix_4091
Fix flutter analyze defaults when files are specified (#4091).
parents
d9916bbb
ce82bc1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+7
-3
No files found.
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
6d2d4953
...
...
@@ -102,9 +102,13 @@ class AnalyzeCommand extends FlutterCommand {
}
}
bool
currentDirectory
=
argResults
[
'current-directory'
]
&&
(
argResults
.
wasParsed
(
'current-directory'
)
||
dartFiles
.
isEmpty
);
bool
currentPackage
=
argResults
[
'current-package'
]
&&
(
argResults
.
wasParsed
(
'current-package'
)
||
dartFiles
.
isEmpty
);
bool
flutterRepo
=
argResults
[
'flutter-repo'
];
//TODO (pq): revisit package and directory defaults
if
(
argResults
[
'current-directory'
]
&&
!
argResults
[
'flutter-repo'
]
)
{
if
(
currentDirectory
&&
!
flutterRepo
)
{
// ./*.dart
Directory
currentDirectory
=
new
Directory
(
'.'
);
bool
foundOne
=
false
;
...
...
@@ -118,7 +122,7 @@ class AnalyzeCommand extends FlutterCommand {
pubSpecDirectories
.
add
(
currentDirectory
);
}
if
(
argResults
[
'current-package'
]
&&
!
argResults
[
'flutter-repo'
]
)
{
if
(
currentPackage
&&
!
flutterRepo
)
{
// **/.*dart
Directory
currentDirectory
=
new
Directory
(
'.'
);
_collectDartFiles
(
currentDirectory
,
dartFiles
);
...
...
@@ -129,7 +133,7 @@ class AnalyzeCommand extends FlutterCommand {
//TODO (pq): extract this regexp from the exclude in options
RegExp
stockExampleFiles
=
new
RegExp
(
'examples/stocks/lib/.*
\
.dart
\$
'
);
if
(
argResults
[
'flutter-repo'
]
)
{
if
(
flutterRepo
)
{
for
(
Directory
dir
in
runner
.
getRepoPackages
())
{
_collectDartFiles
(
dir
,
dartFiles
,
exclude:
(
FileSystemEntity
entity
)
=>
stockExampleFiles
.
hasMatch
(
entity
.
path
));
...
...
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