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
3b882fc4
Commit
3b882fc4
authored
May 05, 2016
by
pq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated arg default handling and .dartignore support.
parent
e808125c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+10
-3
No files found.
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
3b882fc4
...
...
@@ -111,7 +111,9 @@ class AnalyzeCommand extends FlutterCommand {
}
}
if
(
argResults
[
'current-directory'
])
{
//TODO(pq): revisit package and directory defaults
if
(
argResults
[
'current-directory'
]
&&
!
argResults
[
'flutter-repo'
])
{
// ./*.dart
Directory
cwd
=
new
Directory
(
'.'
);
bool
foundOne
=
false
;
...
...
@@ -126,7 +128,7 @@ class AnalyzeCommand extends FlutterCommand {
}
}
if
(
argResults
[
'current-package'
])
{
if
(
argResults
[
'current-package'
]
&&
!
argResults
[
'flutter-repo'
]
)
{
// **/.*dart
Directory
cwd
=
new
Directory
(
'.'
);
_collectDartFiles
(
cwd
,
dartFiles
);
...
...
@@ -134,7 +136,7 @@ class AnalyzeCommand extends FlutterCommand {
}
//TODO(ianh): Fix the intl package resource generator
//TODO
: extract this regexp from the exclude in options.
//TODO
(pq): extract this regexp from the exclude in options
RegExp
stockExampleFiles
=
new
RegExp
(
'examples/stocks/lib/.*
\
.dart
\$
'
);
if
(
argResults
[
'flutter-repo'
])
{
...
...
@@ -270,6 +272,10 @@ class AnalyzeCommand extends FlutterCommand {
}
List
<
File
>
_collectDartFiles
(
Directory
dir
,
List
<
File
>
collected
,
{
FileFilter
exclude
})
{
// Bail out in case of a .dartignore.
if
(
FileSystemEntity
.
isFileSync
(
path
.
join
(
path
.
dirname
(
dir
.
path
),
'.dartignore'
)))
return
collected
;
for
(
FileSystemEntity
entity
in
dir
.
listSync
(
recursive:
false
,
followLinks:
false
))
{
if
(
isDartFile
(
entity
)
&&
(
exclude
==
null
||
!
exclude
(
entity
)))
{
collected
.
add
(
entity
);
...
...
@@ -280,6 +286,7 @@ class AnalyzeCommand extends FlutterCommand {
_collectDartFiles
(
entity
,
collected
,
exclude:
exclude
);
}
}
return
collected
;
}
...
...
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