Index: pkg/analyzer_cli/lib/src/package_analyzer.dart |
diff --git a/pkg/analyzer_cli/lib/src/package_analyzer.dart b/pkg/analyzer_cli/lib/src/package_analyzer.dart |
index 418db256480b64919ab045f12693df39457f9286..fd173a369124f365f47de7fb40cd3c18b9f7dd46 100644 |
--- a/pkg/analyzer_cli/lib/src/package_analyzer.dart |
+++ b/pkg/analyzer_cli/lib/src/package_analyzer.dart |
@@ -31,6 +31,7 @@ import 'package:path/path.dart' as pathos; |
*/ |
class PackageAnalyzer { |
final CommandLineOptions options; |
+ final AnalysisStats stats; |
String packagePath; |
String packageLibPath; |
@@ -39,7 +40,7 @@ class PackageAnalyzer { |
InternalAnalysisContext context; |
final List<Source> explicitSources = <Source>[]; |
- PackageAnalyzer(this.options); |
+ PackageAnalyzer(this.options, this.stats); |
/** |
* Perform package analysis according to the given [options]. |
@@ -181,11 +182,13 @@ class PackageAnalyzer { |
ErrorFormatter formatter = new ErrorFormatter( |
sink, |
options, |
+ stats, |
(AnalysisError error) => |
AnalyzerImpl.processError(error, options, context)); |
for (Source source in explicitSources) { |
AnalysisErrorInfo errorInfo = context.getErrors(source); |
formatter.formatErrors([errorInfo]); |
} |
+ stats.print(sink); |
} |
} |