Silence new analyzer warnings (#6866)
See https://github.com/flutter/flutter/pull/6861 This silences all but two of the warnings from https://travis-ci.org/flutter/flutter/builds/176055550 One of the silenced warnings was a genuine code error. Some of the others were correct but there was no way for the analyzer to know, and I worked around them. The remainder are problems with the analyzer, specifically https://github.com/dart-lang/sdk/issues/27827 and https://github.com/dart-lang/sdk/issues/27504.
This commit is contained in:
@@ -148,11 +148,12 @@ List<String> findPackageNames() {
|
||||
List<Directory> findPackages() {
|
||||
return new Directory('packages')
|
||||
.listSync()
|
||||
.where((FileSystemEntity entity) => entity is Directory)
|
||||
.where((Directory dir) {
|
||||
File pubspec = new File('${dir.path}/pubspec.yaml');
|
||||
bool nodoc = pubspec.readAsStringSync().contains('nodoc: true');
|
||||
return !nodoc;
|
||||
.where((FileSystemEntity entity) {
|
||||
if (entity is! Directory)
|
||||
return false;
|
||||
File pubspec = new File('${entity.path}/pubspec.yaml');
|
||||
// TODO(ianh): Use a real YAML parser here
|
||||
return !pubspec.readAsStringSync().contains('nodoc: true');
|
||||
})
|
||||
.toList();
|
||||
}
|
||||
@@ -160,7 +161,6 @@ List<Directory> findPackages() {
|
||||
Iterable<String> libraryRefs() sync* {
|
||||
for (Directory dir in findPackages()) {
|
||||
String dirName = path.basename(dir.path);
|
||||
|
||||
for (FileSystemEntity file in new Directory('${dir.path}/lib').listSync()) {
|
||||
if (file is File && file.path.endsWith('.dart'))
|
||||
yield '$dirName/${path.basename(file.path)}';
|
||||
|
||||
Reference in New Issue
Block a user