Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: utils/pub/validator/name.dart

Issue 11472033: Fix "src" detection in the pub lish validator on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« utils/pub/command_lish.dart ('K') | « utils/pub/command_lish.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/validator/name.dart
diff --git a/utils/pub/validator/name.dart b/utils/pub/validator/name.dart
index 570f8b8302bce638dfe2f83b8ffbffb2a39fe525..37de043951d89e3af1c178805d54db6057376125 100644
--- a/utils/pub/validator/name.dart
+++ b/utils/pub/validator/name.dart
@@ -31,7 +31,9 @@ class NameValidator extends Validator {
return listDir(libDir, recursive: true);
}).transform((files) {
for (var file in files) {
- if (file.contains("/src/")) continue;
+ // TODO(nweiz): Since `file` is absolute, this will break if the package
+ // itself is in a directory named "src".
+ if (splitPath(file).contains("src")) continue;
if (new Path(file).extension != 'dart') continue;
var libName = new Path(basename(file)).filenameWithoutExtension;
_checkName(libName, 'The name of "$file", "$libName",');
« utils/pub/command_lish.dart ('K') | « utils/pub/command_lish.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698