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

Side by Side Diff: pkg/analyzer_experimental/bin/analyzer.dart

Issue 34623007: Analyzer/formatter transitions from (deprecated) Options to main(args). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | « no previous file | pkg/analyzer_experimental/bin/coverage.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 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 2
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 6
7 /** The entry point for the analyzer. */ 7 /** The entry point for the analyzer. */
8 library analyzer; 8 library analyzer;
9 9
10 import 'dart:async'; 10 import 'dart:async';
11 import 'dart:convert'; 11 import 'dart:convert';
12 import 'dart:io'; 12 import 'dart:io';
13 13
14 import 'package:analyzer_experimental/src/generated/engine.dart'; 14 import 'package:analyzer_experimental/src/generated/engine.dart';
15 import 'package:analyzer_experimental/src/generated/error.dart'; 15 import 'package:analyzer_experimental/src/generated/error.dart';
16 import 'package:analyzer_experimental/src/generated/java_core.dart' show JavaSys tem; 16 import 'package:analyzer_experimental/src/generated/java_core.dart' show JavaSys tem;
17 import 'package:analyzer_experimental/options.dart'; 17 import 'package:analyzer_experimental/options.dart';
18 18
19 import 'package:analyzer_experimental/src/analyzer_impl.dart'; 19 import 'package:analyzer_experimental/src/analyzer_impl.dart';
20 import 'package:analyzer_experimental/src/error_formatter.dart'; 20 import 'package:analyzer_experimental/src/error_formatter.dart';
21 21
22 void main() { 22 void main(args) {
23 var args = new Options().arguments;
24 var options = CommandLineOptions.parse(args); 23 var options = CommandLineOptions.parse(args);
25 if (options.shouldBatch) { 24 if (options.shouldBatch) {
26 BatchRunner.runAsBatch(args, (List<String> args) { 25 BatchRunner.runAsBatch(args, (List<String> args) {
27 var options = CommandLineOptions.parse(args); 26 var options = CommandLineOptions.parse(args);
28 return _runAnalyzer(options); 27 return _runAnalyzer(options);
29 }); 28 });
30 } else { 29 } else {
31 int startTime = JavaSystem.currentTimeMillis(); 30 int startTime = JavaSystem.currentTimeMillis();
32 31
33 ErrorSeverity result = _runAnalyzer(options); 32 ErrorSeverity result = _runAnalyzer(options);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon ds}ms'); 129 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon ds}ms');
131 } catch (e, stackTrace) { 130 } catch (e, stackTrace) {
132 stderr.writeln(e); 131 stderr.writeln(e);
133 stderr.writeln(stackTrace); 132 stderr.writeln(stackTrace);
134 stderr.writeln('>>> EOF STDERR'); 133 stderr.writeln('>>> EOF STDERR');
135 stdout.writeln('>>> TEST CRASH'); 134 stdout.writeln('>>> TEST CRASH');
136 } 135 }
137 }); 136 });
138 } 137 }
139 } 138 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_experimental/bin/coverage.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698