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

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

Issue 12262056: Clean up some warnings and deprecated calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/pub/utils.dart ('k') | utils/tests/pub/command_line_config.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 validator; 5 library validator;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'entrypoint.dart'; 9 import 'entrypoint.dart';
10 import 'log.dart' as log; 10 import 'log.dart' as log;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return Future.wait(validators.map((validator) => validator.validate())) 68 return Future.wait(validators.map((validator) => validator.validate()))
69 .then((_) { 69 .then((_) {
70 var errors = 70 var errors =
71 flatten(validators.map((validator) => validator.errors)); 71 flatten(validators.map((validator) => validator.errors));
72 var warnings = 72 var warnings =
73 flatten(validators.map((validator) => validator.warnings)); 73 flatten(validators.map((validator) => validator.warnings));
74 74
75 if (!errors.isEmpty) { 75 if (!errors.isEmpty) {
76 log.error("Missing requirements:"); 76 log.error("Missing requirements:");
77 for (var error in errors) { 77 for (var error in errors) {
78 log.error("* ${Strings.join(error.split('\n'), '\n ')}"); 78 log.error("* ${error.split('\n').join('\n ')}");
79 } 79 }
80 log.error(""); 80 log.error("");
81 } 81 }
82 82
83 if (!warnings.isEmpty) { 83 if (!warnings.isEmpty) {
84 log.warning("Suggestions:"); 84 log.warning("Suggestions:");
85 for (var warning in warnings) { 85 for (var warning in warnings) {
86 log.warning("* ${Strings.join(warning.split('\n'), '\n ')}"); 86 log.warning("* ${warning.split('\n').join('\n ')}");
87 } 87 }
88 log.warning(""); 88 log.warning("");
89 } 89 }
90 90
91 return new Pair<List<String>, List<String>>(errors, warnings); 91 return new Pair<List<String>, List<String>>(errors, warnings);
92 }); 92 });
93 } 93 }
94 } 94 }
OLDNEW
« no previous file with comments | « utils/pub/utils.dart ('k') | utils/tests/pub/command_line_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698