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

Unified Diff: lib/src/compiler.dart

Issue 1419973003: generate an html report of the compilation results (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: address review comments Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler.dart
diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart
index a38f43b73408a79014b2e23c2d2eff0b72f21aba..03d0607b17f1ff57baaae5405d890a9fc8c1ec58 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,8 +68,10 @@ bool compile(CompilerOptions options) {
var reporter = createErrorReporter(context, options);
bool status = new BatchCompiler(context, options, reporter: reporter).run();
- if (options.dumpInfo && reporter is SummaryReporter) {
- var result = (reporter as SummaryReporter).result;
+ if (reporter is HtmlReporter) {
+ reporter.finish(options);
+ } else if (options.dumpInfo && reporter is SummaryReporter) {
+ var result = reporter.result;
print(summaryToString(result));
if (options.dumpInfoFile != null) {
var file = new File(options.dumpInfoFile);
@@ -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);
}
« no previous file with comments | « no previous file | lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698