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

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

Issue 12255016: Get rid of old redundant methods in io.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise and update to latest. Created 7 years, 10 months 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
« no previous file with comments | « utils/pub/validator/lib.dart ('k') | utils/pub/validator/name.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/validator/license.dart
diff --git a/utils/pub/validator/license.dart b/utils/pub/validator/license.dart
index 8c32548c9c6918812bb94d1fd113e3e94520017d..63b9aa86a801ab5274aaa3b2dc8ae90288d708e5 100644
--- a/utils/pub/validator/license.dart
+++ b/utils/pub/validator/license.dart
@@ -6,6 +6,8 @@ library pubspec_field_validator;
import 'dart:async';
+import '../../../pkg/path/lib/path.dart' as path;
+
import '../entrypoint.dart';
import '../io.dart';
import '../system_cache.dart';
@@ -20,7 +22,7 @@ class LicenseValidator extends Validator {
return listDir(entrypoint.root.dir).then((files) {
var licenseLike = new RegExp(
r"^([a-zA-Z0-9]+[-_])?(LICENSE|COPYING)(\..*)?$");
- if (files.map(basename).any(licenseLike.hasMatch)) return;
+ if (files.map(path.basename).any(licenseLike.hasMatch)) return;
errors.add(
"You must have a COPYING or LICENSE file in the root directory.\n"
« no previous file with comments | « utils/pub/validator/lib.dart ('k') | utils/pub/validator/name.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698