Chromium Code Reviews| Index: lib/src/compiler.dart |
| diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart |
| index a38f43b73408a79014b2e23c2d2eff0b72f21aba..a2d7301d86ab50d78f705fec9d61f20e2e36e9ea 100644 |
| --- a/lib/src/compiler.dart |
| +++ b/lib/src/compiler.dart |
| @@ -32,6 +32,7 @@ import 'info.dart' |
| show AnalyzerMessage, CheckerResults, LibraryInfo, LibraryUnit; |
| import 'options.dart'; |
| import 'report.dart'; |
| +import 'report/html_reporter.dart'; |
| /// Sets up the type checker logger to print a span that highlights error |
| /// messages. |
| @@ -67,7 +68,9 @@ bool compile(CompilerOptions options) { |
| var reporter = createErrorReporter(context, options); |
| bool status = new BatchCompiler(context, options, reporter: reporter).run(); |
| - if (options.dumpInfo && reporter is SummaryReporter) { |
| + if (reporter is HtmlReporter) { |
| + (reporter as HtmlReporter).finish(options); |
|
vsm
2015/10/27 20:04:55
You might not need the cast here if type promotion
devoncarew
2015/10/27 20:32:35
Done.
|
| + } else if (options.dumpInfo && reporter is SummaryReporter) { |
| var result = (reporter as SummaryReporter).result; |
| print(summaryToString(result)); |
| if (options.dumpInfoFile != null) { |
| @@ -476,7 +479,7 @@ abstract class AbstractCompiler { |
| AnalysisErrorListener createErrorReporter( |
| AnalysisContext context, CompilerOptions options) { |
| - return options.dumpInfo |
| + return options.htmlReport ? new HtmlReporter(context) : options.dumpInfo |
| ? new SummaryReporter(context, options.logLevel) |
| : new LogReporter(context, useColors: options.useColors); |
| } |