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

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

Issue 706933005: Additional fixes to printing of error codes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/test/generated/test_support.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) 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 error_formatter; 5 library error_formatter;
6 6
7 import 'generated/engine.dart'; 7 import 'generated/engine.dart';
8 import 'generated/error.dart'; 8 import 'generated/error.dart';
9 import 'generated/source_io.dart'; 9 import 'generated/source_io.dart';
10 import '../options.dart'; 10 import '../options.dart';
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ErrorSeverity severity = AnalyzerImpl.computeSeverity( 128 ErrorSeverity severity = AnalyzerImpl.computeSeverity(
129 error, options.enableTypeChecks); 129 error, options.enableTypeChecks);
130 if (options.machineFormat) { 130 if (options.machineFormat) {
131 if (severity == ErrorSeverity.WARNING && options.warningsAreFatal) { 131 if (severity == ErrorSeverity.WARNING && options.warningsAreFatal) {
132 severity = ErrorSeverity.ERROR; 132 severity = ErrorSeverity.ERROR;
133 } 133 }
134 out.write(severity); 134 out.write(severity);
135 out.write('|'); 135 out.write('|');
136 out.write(error.errorCode.type); 136 out.write(error.errorCode.type);
137 out.write('|'); 137 out.write('|');
138 out.write(error.errorCode); 138 out.write(error.errorCode.name);
139 out.write('|'); 139 out.write('|');
140 out.write(escapePipe(source.fullName)); 140 out.write(escapePipe(source.fullName));
141 out.write('|'); 141 out.write('|');
142 out.write(location.lineNumber); 142 out.write(location.lineNumber);
143 out.write('|'); 143 out.write('|');
144 out.write(location.columnNumber); 144 out.write(location.columnNumber);
145 out.write('|'); 145 out.write('|');
146 out.write(length); 146 out.write(length);
147 out.write('|'); 147 out.write('|');
148 out.write(escapePipe(error.message)); 148 out.write(escapePipe(error.message));
(...skipping 22 matching lines...) Expand all
171 } 171 }
172 172
173 static String pluralize(String word, int count) { 173 static String pluralize(String word, int count) {
174 if (count == 1) { 174 if (count == 1) {
175 return word; 175 return word;
176 } else { 176 } else {
177 return word + "s"; 177 return word + "s";
178 } 178 }
179 } 179 }
180 } 180 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/test_support.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698