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
6a82b104
Unverified
Commit
6a82b104
authored
Apr 20, 2018
by
Devon Carew
Committed by
GitHub
Apr 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use the --dart-sdk parameter to flutter analyze if passed in (#16751)
parent
85473d09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
analyze_continuously.dart
.../flutter_tools/lib/src/commands/analyze_continuously.dart
+9
-7
analyze_once.dart
packages/flutter_tools/lib/src/commands/analyze_once.dart
+4
-1
No files found.
packages/flutter_tools/lib/src/commands/analyze_continuously.dart
View file @
6a82b104
...
...
@@ -15,7 +15,7 @@ import '../base/process_manager.dart';
import
'../base/terminal.dart'
;
import
'../base/utils.dart'
;
import
'../cache.dart'
;
import
'../dart/sdk.dart'
;
import
'../dart/sdk.dart'
as
sdk
;
import
'../globals.dart'
;
import
'analyze_base.dart'
;
...
...
@@ -53,7 +53,9 @@ class AnalyzeContinuously extends AnalyzeBase {
analysisTarget
=
fs
.
currentDirectory
.
path
;
}
final
AnalysisServer
server
=
new
AnalysisServer
(
dartSdkPath
,
directories
,
previewDart2:
previewDart2
);
final
String
sdkPath
=
argResults
[
'dart-sdk'
]
??
sdk
.
dartSdkPath
;
final
AnalysisServer
server
=
new
AnalysisServer
(
sdkPath
,
directories
,
previewDart2:
previewDart2
);
server
.
onAnalyzing
.
listen
((
bool
isAnalyzing
)
=>
_handleAnalysisStatus
(
server
,
isAnalyzing
));
server
.
onErrors
.
listen
(
_handleAnalysisErrors
);
...
...
@@ -151,9 +153,9 @@ class AnalyzeContinuously extends AnalyzeBase {
}
class
AnalysisServer
{
AnalysisServer
(
this
.
sdk
,
this
.
directories
,
{
this
.
previewDart2
:
false
});
AnalysisServer
(
this
.
sdk
Path
,
this
.
directories
,
{
this
.
previewDart2
:
false
});
final
String
sdk
;
final
String
sdk
Path
;
final
List
<
String
>
directories
;
final
bool
previewDart2
;
...
...
@@ -164,12 +166,12 @@ class AnalysisServer {
int
_id
=
0
;
Future
<
Null
>
start
()
async
{
final
String
snapshot
=
fs
.
path
.
join
(
sdk
,
'bin/snapshots/analysis_server.dart.snapshot'
);
final
String
snapshot
=
fs
.
path
.
join
(
sdk
Path
,
'bin/snapshots/analysis_server.dart.snapshot'
);
final
List
<
String
>
command
=
<
String
>[
fs
.
path
.
join
(
dartS
dkPath
,
'bin'
,
'dart'
),
fs
.
path
.
join
(
s
dkPath
,
'bin'
,
'dart'
),
snapshot
,
'--sdk'
,
sdk
,
sdk
Path
,
];
if
(
previewDart2
)
{
...
...
packages/flutter_tools/lib/src/commands/analyze_once.dart
View file @
6a82b104
...
...
@@ -13,6 +13,7 @@ import '../base/process.dart';
import
'../base/utils.dart'
;
import
'../cache.dart'
;
import
'../dart/analysis.dart'
;
import
'../dart/sdk.dart'
as
sdk
;
import
'../globals.dart'
;
import
'analyze.dart'
;
import
'analyze_base.dart'
;
...
...
@@ -93,7 +94,9 @@ class AnalyzeOnce extends AnalyzeBase {
arguments
.
add
(
'--no-preview-dart-2'
);
}
final
String
dartanalyzer
=
fs
.
path
.
join
(
Cache
.
flutterRoot
,
'bin'
,
'cache'
,
'dart-sdk'
,
'bin'
,
'dartanalyzer'
);
final
String
sdkPath
=
argResults
[
'dart-sdk'
]
??
sdk
.
dartSdkPath
;
final
String
dartanalyzer
=
fs
.
path
.
join
(
sdkPath
,
'bin'
,
'dartanalyzer'
);
arguments
.
insert
(
0
,
dartanalyzer
);
bool
noErrors
=
false
;
final
Set
<
String
>
issues
=
new
Set
<
String
>();
...
...
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