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

Unified Diff: pkg/compiler/lib/src/apiimpl.dart

Issue 1077373003: Add fatal-warnings flag, that turns warnings into compilation errors (the name (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 7449c7a773c579cf3b592dc1f8b97dad95cd63fd..bdfec9061b0ef95e75af8ea17d7b8906d4b3115a 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -82,6 +82,7 @@ class Compiler extends leg.Compiler {
forceIncrementalSupport ||
hasOption(options, '--incremental-support'),
suppressWarnings: hasOption(options, '--suppress-warnings'),
+ fatalWarnings: hasOption(options, '--fatal-warnings'),
enableExperimentalMirrors:
hasOption(options, '--enable-experimental-mirrors'),
generateCodeWithCompileTimeErrors:
@@ -354,7 +355,8 @@ class Compiler extends leg.Compiler {
api.Diagnostic kind) {
leg.SourceSpan span = spanFromSpannable(node);
if (identical(kind, api.Diagnostic.ERROR)
- || identical(kind, api.Diagnostic.CRASH)) {
+ || identical(kind, api.Diagnostic.CRASH)
+ || (fatalWarnings && identical(kind, api.Diagnostic.WARNING))) {
compilationFailed = true;
}
// [:span.uri:] might be [:null:] in case of a [Script] with no [uri]. For
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698