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

Side by Side Diff: lib/devc.dart

Issue 1126243004: Summarize only per logging level (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | lib/src/options.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// Command line tool to run the checker on a Dart program. 5 /// Command line tool to run the checker on a Dart program.
6 library dev_compiler.devc; 6 library dev_compiler.devc;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 factory Compiler(CompilerOptions options, 57 factory Compiler(CompilerOptions options,
58 {TypeResolver resolver, CheckerReporter reporter}) { 58 {TypeResolver resolver, CheckerReporter reporter}) {
59 if (resolver == null) { 59 if (resolver == null) {
60 resolver = options.useMockSdk 60 resolver = options.useMockSdk
61 ? new TypeResolver.fromMock(mockSdkSources, options) 61 ? new TypeResolver.fromMock(mockSdkSources, options)
62 : new TypeResolver.fromDir(options.dartSdkPath, options); 62 : new TypeResolver.fromDir(options.dartSdkPath, options);
63 } 63 }
64 64
65 if (reporter == null) { 65 if (reporter == null) {
66 reporter = options.dumpInfo 66 reporter = options.dumpInfo
67 ? new SummaryReporter() 67 ? new SummaryReporter(options.logLevel)
68 : new LogReporter(options.useColors); 68 : new LogReporter(options.useColors);
69 } 69 }
70 var graph = new SourceGraph(resolver.context, reporter, options); 70 var graph = new SourceGraph(resolver.context, reporter, options);
71 var rules = 71 var rules =
72 new RestrictedRules(resolver.context.typeProvider, options: options); 72 new RestrictedRules(resolver.context.typeProvider, options: options);
73 var checker = new CodeChecker(rules, reporter, options); 73 var checker = new CodeChecker(rules, reporter, options);
74 74
75 var inputFile = options.entryPointFile; 75 var inputFile = options.entryPointFile;
76 var inputUri = inputFile.startsWith('dart:') || 76 var inputUri = inputFile.startsWith('dart:') ||
77 inputFile.startsWith('package:') 77 inputFile.startsWith('package:')
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // Note: the cache-control header should be enough, but this doesn't hurt 308 // Note: the cache-control header should be enough, but this doesn't hurt
309 // and can help renew the policy after it expires. 309 // and can help renew the policy after it expires.
310 headers['ETag'] = hash; 310 headers['ETag'] = hash;
311 } 311 }
312 return response.change(headers: headers); 312 return response.change(headers: headers);
313 }; 313 };
314 } 314 }
315 315
316 final _log = new Logger('dev_compiler'); 316 final _log = new Logger('dev_compiler');
317 final _earlyErrorResult = new CheckerResults(const [], null, true); 317 final _earlyErrorResult = new CheckerResults(const [], null, true);
OLDNEW
« no previous file with comments | « no previous file | lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698