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

Side by Side Diff: utils/pub/validator/pubspec_field.dart

Issue 11785028: Commit Martin's patch for pub + lib_v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pubspec_field_validator; 5 library pubspec_field_validator;
6 6
7 import 'dart:async';
8
7 import '../entrypoint.dart'; 9 import '../entrypoint.dart';
8 import '../system_cache.dart'; 10 import '../system_cache.dart';
9 import '../validator.dart'; 11 import '../validator.dart';
10 import '../version.dart'; 12 import '../version.dart';
11 13
12 /// A validator that checks that the pubspec has valid "author" and "homepage" 14 /// A validator that checks that the pubspec has valid "author" and "homepage"
13 /// fields. 15 /// fields.
14 class PubspecFieldValidator extends Validator { 16 class PubspecFieldValidator extends Validator {
15 PubspecFieldValidator(Entrypoint entrypoint) 17 PubspecFieldValidator(Entrypoint entrypoint)
16 : super(entrypoint); 18 : super(entrypoint);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 52 }
51 53
52 var version = pubspec.fields['version']; 54 var version = pubspec.fields['version'];
53 if (version == null) { 55 if (version == null) {
54 errors.add('Your pubspec.yaml is missing a "version" field.'); 56 errors.add('Your pubspec.yaml is missing a "version" field.');
55 } 57 }
56 58
57 return new Future.immediate(null); 59 return new Future.immediate(null);
58 } 60 }
59 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698