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

Side by Side Diff: pkg/analyzer/lib/src/analyzer_impl.dart

Issue 196223004: New verbose flag for the dart command line analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« pkg/analyzer/lib/options.dart ('K') | « pkg/analyzer/lib/options.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 analyzer_impl; 5 library analyzer_impl;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 packageDirectory = getPackageDirectoryFor(sourceFile); 152 packageDirectory = getPackageDirectoryFor(sourceFile);
153 } 153 }
154 if (packageDirectory != null) { 154 if (packageDirectory != null) {
155 resolvers.add(new PackageUriResolver([packageDirectory])); 155 resolvers.add(new PackageUriResolver([packageDirectory]));
156 } 156 }
157 } 157 }
158 sourceFactory = new SourceFactory(resolvers); 158 sourceFactory = new SourceFactory(resolvers);
159 context = AnalysisEngine.instance.createAnalysisContext(); 159 context = AnalysisEngine.instance.createAnalysisContext();
160 context.sourceFactory = sourceFactory; 160 context.sourceFactory = sourceFactory;
161 // Uncomment the following to have errors reported on stdout and stderr 161 // Uncomment the following to have errors reported on stdout and stderr
162 // AnalysisEngine.instance.logger = new StdLogger(); 162 if (options.verbose) {
163 AnalysisEngine.instance.logger = new StdLogger();
164 }
163 165
164 // set options for context 166 // set options for context
165 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); 167 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl();
166 contextOptions.cacheSize = _MAX_CACHE_SIZE; 168 contextOptions.cacheSize = _MAX_CACHE_SIZE;
167 contextOptions.hint = !options.disableHints; 169 contextOptions.hint = !options.disableHints;
168 context.analysisOptions = contextOptions; 170 context.analysisOptions = contextOptions;
169 171
170 // Create and add a ChangeSet 172 // Create and add a ChangeSet
171 ChangeSet changeSet = new ChangeSet(); 173 ChangeSet changeSet = new ChangeSet();
172 changeSet.addedSource(source); 174 changeSet.addedSource(source);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 @override 283 @override
282 void logInformation(String message) { 284 void logInformation(String message) {
283 stdout.writeln(message); 285 stdout.writeln(message);
284 } 286 }
285 287
286 @override 288 @override
287 void logInformation2(String message, Exception exception) { 289 void logInformation2(String message, Exception exception) {
288 stdout.writeln(message); 290 stdout.writeln(message);
289 } 291 }
290 } 292 }
OLDNEW
« pkg/analyzer/lib/options.dart ('K') | « pkg/analyzer/lib/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698