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

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

Issue 142403004: Analyzer should set exitCode instead of calling exit (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « no previous file | 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 #!/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';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 print("errors:$errorsTime"); 45 print("errors:$errorsTime");
46 print("hints:$hintsTime"); 46 print("hints:$hintsTime");
47 print("angular:$angularTime"); 47 print("angular:$angularTime");
48 print("other:${totalTime 48 print("other:${totalTime
49 - (scanTime + parseTime + resolveTime + errorsTime + hintsTime 49 - (scanTime + parseTime + resolveTime + errorsTime + hintsTime
50 + angularTime)}}"); 50 + angularTime)}}");
51 print("total:$totalTime"); 51 print("total:$totalTime");
52 print(""); 52 print("");
53 print("Time spent in instanceof = ${instanceOfTimer.elapsedMilliseconds}") ; 53 print("Time spent in instanceof = ${instanceOfTimer.elapsedMilliseconds}") ;
54 } 54 }
55 55 exitCode = result.ordinal;
56 exit(result.ordinal);
57 } 56 }
58 } 57 }
59 58
60 ErrorSeverity _runAnalyzer(CommandLineOptions options) { 59 ErrorSeverity _runAnalyzer(CommandLineOptions options) {
61 if (!options.machineFormat) { 60 if (!options.machineFormat) {
62 stdout.writeln("Analyzing ${options.sourceFiles}..."); 61 stdout.writeln("Analyzing ${options.sourceFiles}...");
63 } 62 }
64 ErrorSeverity allResult = ErrorSeverity.NONE; 63 ErrorSeverity allResult = ErrorSeverity.NONE;
65 String sourcePath = options.sourceFiles[0]; 64 String sourcePath = options.sourceFiles[0];
66 sourcePath = sourcePath.trim(); 65 sourcePath = sourcePath.trim();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon ds}ms'); 140 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon ds}ms');
142 } catch (e, stackTrace) { 141 } catch (e, stackTrace) {
143 stderr.writeln(e); 142 stderr.writeln(e);
144 stderr.writeln(stackTrace); 143 stderr.writeln(stackTrace);
145 stderr.writeln('>>> EOF STDERR'); 144 stderr.writeln('>>> EOF STDERR');
146 stdout.writeln('>>> TEST CRASH'); 145 stdout.writeln('>>> TEST CRASH');
147 } 146 }
148 }); 147 });
149 } 148 }
150 } 149 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698