Merge pull request #521 from abarth/fix_analyzer
Fix analyzer warnings in updater package
This commit is contained in:
@@ -96,6 +96,7 @@ class AnalyzeCommand extends FlutterCommand {
|
||||
pubSpecDirectories.add(flutterDir.path);
|
||||
|
||||
// .../packages/*/bin/*.dart
|
||||
// .../packages/*/lib/main.dart
|
||||
Directory packages = new Directory(path.join(ArtifactStore.flutterRoot, 'packages'));
|
||||
for (FileSystemEntity entry in packages.listSync()) {
|
||||
if (entry is Directory) {
|
||||
@@ -109,6 +110,11 @@ class AnalyzeCommand extends FlutterCommand {
|
||||
}
|
||||
}
|
||||
}
|
||||
String mainPath = path.join(entry.path, 'lib', 'main.dart');
|
||||
if (FileSystemEntity.isFileSync(mainPath)) {
|
||||
dartFiles.add(mainPath);
|
||||
foundOne = true;
|
||||
}
|
||||
if (foundOne)
|
||||
pubSpecDirectories.add(entry.path);
|
||||
}
|
||||
@@ -298,4 +304,4 @@ class AnalyzeCommand extends FlutterCommand {
|
||||
print('No analyzer warnings!');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user