| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library pub.validator.compiled_dartdoc; | 5 library pub.validator.compiled_dartdoc; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:path/path.dart' as path; | 9 import 'package:path/path.dart' as path; |
| 10 | 10 |
| 11 import '../entrypoint.dart'; | 11 import '../entrypoint.dart'; |
| 12 import '../io.dart'; | 12 import '../io.dart'; |
| 13 import '../utils.dart'; | |
| 14 import '../validator.dart'; | 13 import '../validator.dart'; |
| 15 | 14 |
| 16 /// Validates that a package doesn't contain compiled Dartdoc | 15 /// Validates that a package doesn't contain compiled Dartdoc |
| 17 /// output. | 16 /// output. |
| 18 class CompiledDartdocValidator extends Validator { | 17 class CompiledDartdocValidator extends Validator { |
| 19 CompiledDartdocValidator(Entrypoint entrypoint) | 18 CompiledDartdocValidator(Entrypoint entrypoint) |
| 20 : super(entrypoint); | 19 : super(entrypoint); |
| 21 | 20 |
| 22 Future validate() { | 21 Future validate() { |
| 23 return new Future.sync(() { | 22 return new Future.sync(() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 if (files.every((val) => fileExists(val))) { | 36 if (files.every((val) => fileExists(val))) { |
| 38 warnings.add("Avoid putting generated documentation in " | 37 warnings.add("Avoid putting generated documentation in " |
| 39 "${path.relative(dir)}.\n" | 38 "${path.relative(dir)}.\n" |
| 40 "Generated documentation bloats the package with redundant " | 39 "Generated documentation bloats the package with redundant " |
| 41 "data."); | 40 "data."); |
| 42 } | 41 } |
| 43 } | 42 } |
| 44 }); | 43 }); |
| 45 } | 44 } |
| 46 } | 45 } |
| OLD | NEW |