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

Unified Diff: lib/src/validator/license.dart

Issue 1310253007: Make pub lish validation gitignore-aware. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: analysis hints Created 5 years, 4 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
Index: lib/src/validator/license.dart
diff --git a/lib/src/validator/license.dart b/lib/src/validator/license.dart
index 067765bb8d26de65eafc2f5ad4ddbaa4178d513b..601470636713f0fbac1061467b3eb274eb3805e4 100644
--- a/lib/src/validator/license.dart
+++ b/lib/src/validator/license.dart
@@ -20,7 +20,7 @@ class LicenseValidator extends Validator {
return new Future.sync(() {
var licenseLike = new RegExp(
r"^([a-zA-Z0-9]+[-_])?(LICENSE|COPYING)(\..*)?$");
- if (entrypoint.root.listFiles(recursive: false)
+ if (entrypoint.root.listFiles(recursive: false, useGitIgnore: true)
.map(path.basename)
.any(licenseLike.hasMatch)) {
return;

Powered by Google App Engine
This is Rietveld 408576698