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.lib; | 5 library pub.validator.lib; |
6 | 6 |
7 import 'dart:async' hide TimeoutException; | 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 '../validator.dart'; | 13 import '../validator.dart'; |
14 | 14 |
15 // TODO(nweiz): When issue 7196 is fixed, complain about non-Dart files in lib. | 15 // TODO(nweiz): When issue 7196 is fixed, complain about non-Dart files in lib. |
16 /// A validator that checks that libraries in "lib/" (and not "lib/src/") exist | 16 /// A validator that checks that libraries in "lib/" (and not "lib/src/") exist |
17 /// and are well-formed. | 17 /// and are well-formed. |
(...skipping 18 matching lines...) Expand all Loading... |
36 errors.add('You must have a non-empty "lib" directory.\n' | 36 errors.add('You must have a non-empty "lib" directory.\n' |
37 "Without that, users cannot import any code from your package."); | 37 "Without that, users cannot import any code from your package."); |
38 } else if (files.length == 1 && files.first == "src") { | 38 } else if (files.length == 1 && files.first == "src") { |
39 errors.add('The "lib" directory must contain something other than ' | 39 errors.add('The "lib" directory must contain something other than ' |
40 '"src".\n' | 40 '"src".\n' |
41 "Otherwise, users cannot import any code from your package."); | 41 "Otherwise, users cannot import any code from your package."); |
42 } | 42 } |
43 }); | 43 }); |
44 } | 44 } |
45 } | 45 } |
OLD | NEW |