mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
Review cleanup.
This commit is contained in:
parent
4311ddb461
commit
eb215c14ac
|
@ -7,7 +7,9 @@ dependencies:
|
|||
# here we pin it precisely to avoid version skew across our packages.
|
||||
test: 0.12.13+1
|
||||
|
||||
# Pinned in flutter_tools as well.
|
||||
# We don't actually depend on 'analyzer', but 'test' and 'flutter_tools' do.
|
||||
# We pin the version of analyzer we depend on to avoid version skew across our
|
||||
# packages.
|
||||
analyzer: 0.27.4-alpha.1
|
||||
|
||||
flutter:
|
||||
|
|
|
@ -115,24 +115,23 @@ class AnalyzeCommand extends FlutterCommand {
|
|||
|
||||
if (argResults['current-directory'] && !argResults['flutter-repo']) {
|
||||
// ./*.dart
|
||||
Directory cwd = new Directory('.');
|
||||
Directory currentDirectory = new Directory('.');
|
||||
bool foundOne = false;
|
||||
for (FileSystemEntity entry in cwd.listSync()) {
|
||||
for (FileSystemEntity entry in currentDirectory.listSync()) {
|
||||
if (isDartFile(entry)) {
|
||||
dartFiles.add(entry);
|
||||
foundOne = true;
|
||||
}
|
||||
}
|
||||
if (foundOne) {
|
||||
pubSpecDirectories.add(cwd);
|
||||
}
|
||||
if (foundOne)
|
||||
pubSpecDirectories.add(currentDirectory);
|
||||
}
|
||||
|
||||
if (argResults['current-package'] && !argResults['flutter-repo']) {
|
||||
// **/.*dart
|
||||
Directory cwd = new Directory('.');
|
||||
_collectDartFiles(cwd, dartFiles);
|
||||
pubSpecDirectories.add(cwd);
|
||||
Directory currentDirectory = new Directory('.');
|
||||
_collectDartFiles(currentDirectory, dartFiles);
|
||||
pubSpecDirectories.add(currentDirectory);
|
||||
}
|
||||
|
||||
//TODO (ianh): Fix the intl package resource generator
|
||||
|
@ -218,7 +217,7 @@ class AnalyzeCommand extends FlutterCommand {
|
|||
options.analysisOptionsFile = path.join(ArtifactStore.flutterRoot, 'packages', 'flutter_tools', 'flutter_analysis_options');
|
||||
AnalysisDriver analyzer = new AnalysisDriver(options);
|
||||
|
||||
//TODO:(pq): consider error handling
|
||||
//TODO (pq): consider error handling
|
||||
List<AnalysisErrorDescription> errors = analyzer.analyze(dartFiles);
|
||||
|
||||
int errorCount = 0;
|
||||
|
@ -277,9 +276,8 @@ class AnalyzeCommand extends FlutterCommand {
|
|||
return collected;
|
||||
|
||||
for (FileSystemEntity entity in dir.listSync(recursive: false, followLinks: false)) {
|
||||
if (isDartFile(entity) && (exclude == null || !exclude(entity))) {
|
||||
if (isDartFile(entity) && (exclude == null || !exclude(entity)))
|
||||
collected.add(entity);
|
||||
}
|
||||
if (entity is Directory) {
|
||||
String name = path.basename(entity.path);
|
||||
if (!name.startsWith('.') && name != 'packages')
|
||||
|
|
Loading…
Reference in a new issue