| Index: pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| index 428869ff2400d1fe821568db6a13e1ec4c9e57d5..e6f13707d40170bec535ed57c8c5e1cfd4f4a5f3 100644
|
| --- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| +++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| @@ -254,27 +254,28 @@ class AnalyzerImpl {
|
| static ErrorSeverity computeSeverity(
|
| AnalysisError error, CommandLineOptions options,
|
| [AnalysisContext context]) {
|
| + bool isStrongMode = false;
|
| if (context != null) {
|
| ErrorProcessor processor = ErrorProcessor.getProcessor(context, error);
|
| // If there is a processor for this error, defer to it.
|
| if (processor != null) {
|
| return processor.severity;
|
| }
|
| + isStrongMode = context.analysisOptions.strongMode;
|
| }
|
|
|
| if (!options.enableTypeChecks &&
|
| error.errorCode.type == ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR) {
|
| return ErrorSeverity.INFO;
|
| - }
|
| -
|
| - if (options.hintsAreFatal && error.errorCode is HintCode) {
|
| + } else if (options.hintsAreFatal && error.errorCode is HintCode) {
|
| return ErrorSeverity.ERROR;
|
| - }
|
| -
|
| - if (options.lintsAreFatal && error.errorCode is LintCode) {
|
| + } else if (options.lintsAreFatal && error.errorCode is LintCode) {
|
| + return ErrorSeverity.ERROR;
|
| + } else if (isStrongMode &&
|
| + error is StaticWarningCode &&
|
| + (error as StaticWarningCode).isStrongModeError) {
|
| return ErrorSeverity.ERROR;
|
| }
|
| -
|
| return error.errorCode.errorSeverity;
|
| }
|
|
|
|
|