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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/validator/pubspec_field.dart

Issue 887223007: Revert "Use native async/await support in pub." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
Index: sdk/lib/_internal/pub_generated/lib/src/validator/pubspec_field.dart
diff --git a/sdk/lib/_internal/pub/lib/src/validator/pubspec_field.dart b/sdk/lib/_internal/pub_generated/lib/src/validator/pubspec_field.dart
similarity index 74%
copy from sdk/lib/_internal/pub/lib/src/validator/pubspec_field.dart
copy to sdk/lib/_internal/pub_generated/lib/src/validator/pubspec_field.dart
index 546eb26c7e5b26954b109ab77a890984756f3eaa..d0f55b70cd3f57c6cada926336b878d6a4155ab3 100644
--- a/sdk/lib/_internal/pub/lib/src/validator/pubspec_field.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/validator/pubspec_field.dart
@@ -13,7 +13,7 @@ import '../validator.dart';
/// fields.
class PubspecFieldValidator extends Validator {
PubspecFieldValidator(Entrypoint entrypoint)
- : super(entrypoint);
+ : super(entrypoint);
Future validate() {
_validateAuthors();
@@ -47,15 +47,17 @@ class PubspecFieldValidator extends Validator {
}
if (author != null && author is! String) {
- errors.add('Your pubspec.yaml\'s "author" field must be a string, but it '
- 'was "$author".');
+ errors.add(
+ 'Your pubspec.yaml\'s "author" field must be a string, but it '
+ 'was "$author".');
return;
}
if (authors != null &&
(authors is! List || authors.any((author) => author is! String))) {
- errors.add('Your pubspec.yaml\'s "authors" field must be a list, but '
- 'it was "$authors".');
+ errors.add(
+ 'Your pubspec.yaml\'s "authors" field must be a list, but '
+ 'it was "$authors".');
return;
}
@@ -65,12 +67,13 @@ class PubspecFieldValidator extends Validator {
var hasEmail = new RegExp(r"<[^>]+> *$");
for (var authorName in authors) {
if (!hasName.hasMatch(authorName)) {
- warnings.add('Author "$authorName" in pubspec.yaml should have a '
- 'name.');
+ warnings.add(
+ 'Author "$authorName" in pubspec.yaml should have a ' 'name.');
}
if (!hasEmail.hasMatch(authorName)) {
- warnings.add('Author "$authorName" in pubspec.yaml should have an '
- 'email address\n(e.g. "name <email>").');
+ warnings.add(
+ 'Author "$authorName" in pubspec.yaml should have an '
+ 'email address\n(e.g. "name <email>").');
}
}
}
@@ -81,8 +84,9 @@ class PubspecFieldValidator extends Validator {
if (value == null) {
errors.add('Your pubspec.yaml is missing a "$field" field.');
} else if (value is! String) {
- errors.add('Your pubspec.yaml\'s "$field" field must be a string, but '
- 'it was "$value".');
+ errors.add(
+ 'Your pubspec.yaml\'s "$field" field must be a string, but '
+ 'it was "$value".');
}
}
@@ -92,15 +96,16 @@ class PubspecFieldValidator extends Validator {
if (url == null) return;
if (url is! String) {
- errors.add('Your pubspec.yaml\'s "$field" field must be a string, but '
- 'it was "$url".');
+ errors.add(
+ 'Your pubspec.yaml\'s "$field" field must be a string, but ' 'it was "$url".');
return;
}
var goodScheme = new RegExp(r'^https?:');
if (!goodScheme.hasMatch(url)) {
- errors.add('Your pubspec.yaml\'s "$field" field must be an "http:" or '
- '"https:" URL, but it was "$url".');
+ errors.add(
+ 'Your pubspec.yaml\'s "$field" field must be an "http:" or '
+ '"https:" URL, but it was "$url".');
}
}
}

Powered by Google App Engine
This is Rietveld 408576698