enable lint avoid_function_literals_in_foreach_calls (#12607)

This commit is contained in:
Alexandre Ardhuin
2017-10-19 08:16:16 +02:00
committed by GitHub
parent 79fbf8bb03
commit 700dc9f752
12 changed files with 52 additions and 51 deletions

View File

@@ -146,13 +146,13 @@ void generate(String commit) {
initialize();
final List<SampleInfo> samples = <SampleInfo>[];
sampleDirectory.listSync().forEach((FileSystemEntity entity) {
for (FileSystemEntity entity in sampleDirectory.listSync()) {
if (entity is File && entity.path.endsWith('.dart')) {
final SampleInfo sample = new SampleInfo(entity, commit);
if (sample.initialize()) // skip files that lack the Sample Catalog comment
samples.add(sample);
}
});
}
// Causes the generated imports to appear in alphabetical order.
// Avoid complaints from flutter lint.