Chromium Code Reviews| Index: utils/pub/validator/name.dart |
| diff --git a/utils/pub/validator/name.dart b/utils/pub/validator/name.dart |
| index 249a0c9ee76e2907d4c700d9e2424c0e296d9066..a7b69dd4e87e7f9ba386ad41594a11053b7ec564 100644 |
| --- a/utils/pub/validator/name.dart |
| +++ b/utils/pub/validator/name.dart |
| @@ -66,14 +66,14 @@ class NameValidator extends Validator { |
| if (name == "") { |
| errors.add("$description may not be empty."); |
| } else if (!new RegExp(r"^[a-zA-Z0-9_]*$").hasMatch(name)) { |
| - errors.add("$description may only contain letters, numbers, and " |
| + warnings.add("$description may only contain letters, numbers, and " |
| "underscores.\n" |
| "Using a valid Dart identifier makes the name usable in Dart code."); |
| } else if (!new RegExp(r"^[a-zA-Z]").hasMatch(name)) { |
| - errors.add("$description must begin with letter.\n" |
| + warnings.add("$description must begin with letter.\n" |
| "Using a valid Dart identifier makes the name usable in Dart code."); |
| } else if (_RESERVED_WORDS.contains(name.toLowerCase())) { |
| - errors.add("$description may not be a reserved word in Dart.\n" |
| + warnings.add("$description may not be a reserved word in Dart.\n" |
|
nweiz
2013/02/20 19:41:02
These should still be errors for package names.
Bob Nystrom
2013/02/20 21:13:40
Done.
nweiz
2013/02/20 21:25:02
I meant all of the newly-warning'd errors, not jus
|
| "Using a valid Dart identifier makes the name usable in Dart code."); |
| } else if (new RegExp(r"[A-Z]").hasMatch(name)) { |
| warnings.add('$description should be lower-case. Maybe use ' |