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

Unified Diff: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java

Issue 643763002: Make "error" the default severity for checked mode compile time errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/ErrorType.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java
diff --git a/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java b/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java
index afc68da343b0c979d9662a37436e522c905946f2..0b9b23059dbcec86e33a07b5ee29a9b77417a727 100644
--- a/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java
+++ b/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java
@@ -57,14 +57,13 @@ public class AnalyzerImpl {
private static final HashMap<File, DirectoryBasedDartSdk> sdkMap = new HashMap<File, DirectoryBasedDartSdk>();
/**
- * Compute the severity of the error; however, if {@link escalateCheckedModeCompileTimeErors} is
- * true, then escalate it to {@link ErrorSeverity.ERROR}.
+ * Compute the severity of the error; however, if {@link enableTypeChecks} is true, then
+ * de-escalate checked mode compile time errors to a severity of {@link ErrorSeverity.INFO}.
*/
- public static ErrorSeverity computeSeverity(AnalysisError error,
- boolean escalateCheckedModeCompileTimeErrors) {
- if (escalateCheckedModeCompileTimeErrors
+ public static ErrorSeverity computeSeverity(AnalysisError error, boolean enableTypeChecks) {
+ if (!enableTypeChecks
&& error.getErrorCode().getType() == ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR) {
- return ErrorSeverity.ERROR;
+ return ErrorSeverity.INFO;
}
return error.getErrorCode().getErrorSeverity();
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/ErrorType.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698