| Index: pkg/analyzer/lib/src/analyzer_impl.dart
|
| diff --git a/pkg/analyzer/lib/src/analyzer_impl.dart b/pkg/analyzer/lib/src/analyzer_impl.dart
|
| index 4a80e44f5db55fbdf36f53251cea6eb30e533ad4..efc97a1bd314fe873c98377ac363b45e02914d39 100644
|
| --- a/pkg/analyzer/lib/src/analyzer_impl.dart
|
| +++ b/pkg/analyzer/lib/src/analyzer_impl.dart
|
| @@ -20,6 +20,8 @@ import 'generated/sdk_io.dart';
|
| import 'generated/source_io.dart';
|
| import '../options.dart';
|
|
|
| +import 'dart:collection';
|
| +
|
| import 'package:analyzer/src/generated/java_core.dart' show JavaSystem;
|
| import 'package:analyzer/src/error_formatter.dart';
|
|
|
| @@ -47,6 +49,9 @@ class AnalyzerImpl {
|
| /// All [AnalysisErrorInfo]s in the analyzed library.
|
| final List<AnalysisErrorInfo> errorInfos = new List<AnalysisErrorInfo>();
|
|
|
| + /// [HashMap] between sources and analysis error infos.
|
| + final HashMap<Source, AnalysisErrorInfo> sourceErrorsMap = new HashMap<Source, AnalysisErrorInfo>();
|
| +
|
| AnalyzerImpl(this.sourcePath, this.options, this.startTime) {
|
| if (sdk == null) {
|
| sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
|
| @@ -129,6 +134,7 @@ class AnalyzerImpl {
|
| // again to perform next task
|
| for (ChangeNotice notice in notices) {
|
| sources.add(notice.source);
|
| + sourceErrorsMap[notice.source] = notice;
|
| }
|
| return _analyzeAsync();
|
| }
|
| @@ -137,7 +143,9 @@ class AnalyzerImpl {
|
| // numbers.
|
| //
|
| // prepare errors
|
| - prepareErrors();
|
| + sourceErrorsMap.forEach((k,v) {
|
| + errorInfos.add(sourceErrorsMap[k]);
|
| + });
|
|
|
| // print errors and performance numbers
|
| _printErrorsAndPerf();
|
|
|