Index: utils/pub/validator/compiled_dartdoc.dart |
diff --git a/utils/pub/validator/compiled_dartdoc.dart b/utils/pub/validator/compiled_dartdoc.dart |
index c2c93f3a8708610624d1abdfce09a95813c4ce47..e5a7353d9927f2c20d1d1519ca6370bdf507ec73 100644 |
--- a/utils/pub/validator/compiled_dartdoc.dart |
+++ b/utils/pub/validator/compiled_dartdoc.dart |
@@ -21,27 +21,26 @@ class CompiledDartdocValidator extends Validator { |
Future validate() { |
return listDir(entrypoint.root.dir, recursive: true).then((entries) { |
- return futureWhere(entries, (entry) { |
+ for (var entry in entries) { |
if (basename(entry) != "nav.json") return false; |
var dir = dirname(entry); |
// Look for tell-tale Dartdoc output files all in the same directory. |
- return Future.wait([ |
- fileExists(entry), |
- fileExists(join(dir, "index.html")), |
- fileExists(join(dir, "styles.css")), |
- fileExists(join(dir, "dart-logo-small.png")), |
- fileExists(join(dir, "client-live-nav.js")) |
- ]).then((results) => results.every((val) => val)); |
- }).then((files) { |
- for (var dartdocDir in files.mappedBy(dirname)) { |
- var relativePath = path.relative(dartdocDir); |
+ var files = [ |
+ entry, |
+ join(dir, "index.html"), |
+ join(dir, "styles.css"), |
+ join(dir, "dart-logo-small.png"), |
+ join(dir, "client-live-nav.js") |
+ ]; |
+ |
+ if (files.every((val) => fileExists(val))) { |
warnings.add("Avoid putting generated documentation in " |
- "$relativePath.\n" |
+ "${path.relative(dir)}.\n" |
"Generated documentation bloats the package with redundant " |
"data."); |
} |
- }); |
+ } |
}); |
} |
} |