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
246a2cb0
Commit
246a2cb0
authored
Apr 18, 2016
by
Phil Quitslund
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3375 from pq/sdk_opt
Analyze CLI option to specify a custom Dart SDK.
parents
12cac94c
26519aab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
process.dart
packages/flutter_tools/lib/src/base/process.dart
+4
-3
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+3
-1
No files found.
packages/flutter_tools/lib/src/base/process.dart
View file @
246a2cb0
...
...
@@ -92,9 +92,10 @@ String runSync(List<String> cmd, { String workingDirectory }) {
}
/// Return the platform specific name for the given Dart SDK binary. So, `pub`
/// ==> `pub.bat`.
String
sdkBinaryName
(
String
name
)
{
return
path
.
absolute
(
path
.
join
(
dartSdkPath
,
'bin'
,
Platform
.
isWindows
?
'
$name
.bat'
:
name
));
/// ==> `pub.bat`. The default SDK location can be overridden with a specified
/// [sdkLocation].
String
sdkBinaryName
(
String
name
,
{
String
sdkLocation
})
{
return
path
.
absolute
(
path
.
join
(
sdkLocation
??
dartSdkPath
,
'bin'
,
Platform
.
isWindows
?
'
$name
.bat'
:
name
));
}
bool
exitsHappy
(
List
<
String
>
cli
)
{
...
...
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
246a2cb0
...
...
@@ -100,6 +100,8 @@ class AnalyzeCommand extends FlutterCommand {
argParser
.
addFlag
(
'preamble'
,
help:
'Display the number of files that will be analyzed.'
,
defaultsTo:
true
);
argParser
.
addFlag
(
'congratulate'
,
help:
'Show output even when there are no errors, warnings, hints, or lints.'
,
defaultsTo:
true
);
argParser
.
addFlag
(
'watch'
,
help:
'Run analysis continuously, watching the filesystem for changes.'
,
negatable:
false
);
argParser
.
addOption
(
'dart-sdk'
,
help:
'The path to the Dart SDK.'
,
hide:
true
);
usesPubOption
();
}
...
...
@@ -293,7 +295,7 @@ class AnalyzeCommand extends FlutterCommand {
File
packagesFile
=
new
File
(
path
.
join
(
host
.
path
,
'.packages'
))..
writeAsStringSync
(
packagesBody
.
toString
());
List
<
String
>
cmd
=
<
String
>[
sdkBinaryName
(
'dartanalyzer'
),
sdkBinaryName
(
'dartanalyzer'
,
sdkLocation:
argResults
[
'dart-sdk'
]
),
// do not set '--warnings', since that will include the entire Dart SDK
'--ignore-unrecognized-flags'
,
'--enable_type_checks'
,
...
...
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