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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2775633002: Use ansi color in the dartanalyzer cli output. (Closed)
Patch Set: make tests more robust Created 3 years, 8 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 | pkg/analyzer_cli/lib/src/ansi.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import 'package:analyzer/context/declared_variables.dart'; 9 import 'package:analyzer/context/declared_variables.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 return serialized.map((error) { 1097 return serialized.map((error) {
1098 String errorName = error.uniqueName; 1098 String errorName = error.uniqueName;
1099 ErrorCode errorCode = 1099 ErrorCode errorCode =
1100 errorCodeByUniqueName(errorName) ?? _lintCodeByUniqueName(errorName); 1100 errorCodeByUniqueName(errorName) ?? _lintCodeByUniqueName(errorName);
1101 if (errorCode == null) { 1101 if (errorCode == null) {
1102 // This could fail because the error code is no longer defined, or, in 1102 // This could fail because the error code is no longer defined, or, in
1103 // the case of a lint rule, if the lint rule has been disabled since the 1103 // the case of a lint rule, if the lint rule has been disabled since the
1104 // errors were written. 1104 // errors were written.
1105 throw new StateError('No ErrorCode for $errorName in $file'); 1105 throw new StateError('No ErrorCode for $errorName in $file');
1106 } 1106 }
1107 return new AnalysisError.forValues(file.source, error.offset, 1107 return new AnalysisError.forValues(
1108 error.length, errorCode, error.message, error.correction); 1108 file.source,
1109 error.offset,
1110 error.length,
1111 errorCode,
1112 error.message,
1113 error.correction.isEmpty ? null : error.correction);
1109 }).toList(); 1114 }).toList();
1110 } 1115 }
1111 1116
1112 /** 1117 /**
1113 * Return the key to store fully resolved results for the [signature]. 1118 * Return the key to store fully resolved results for the [signature].
1114 */ 1119 */
1115 String _getResolvedUnitKey(String signature) { 1120 String _getResolvedUnitKey(String signature) {
1116 return '$signature.resolved'; 1121 return '$signature.resolved';
1117 } 1122 }
1118 1123
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 libraryDeclarations.add(new TopLevelDeclarationInSource( 1933 libraryDeclarations.add(new TopLevelDeclarationInSource(
1929 file.source, declaration, isExported)); 1934 file.source, declaration, isExported));
1930 } 1935 }
1931 } 1936 }
1932 } 1937 }
1933 1938
1934 // We're not done yet. 1939 // We're not done yet.
1935 return false; 1940 return false;
1936 } 1941 }
1937 } 1942 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/ansi.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698