| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.source.error_processor; | 5 library analyzer.source.error_processor; |
| 6 | 6 |
| 7 import 'package:analyzer/error/error.dart'; |
| 8 import 'package:analyzer/src/error/codes.dart'; |
| 7 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 8 import 'package:analyzer/src/generated/error.dart'; | |
| 9 import 'package:analyzer/src/generated/utilities_general.dart'; | 10 import 'package:analyzer/src/generated/utilities_general.dart'; |
| 11 import 'package:analyzer/src/task/options.dart' |
| 12 show CONFIGURED_ERROR_PROCESSORS; |
| 10 import 'package:analyzer/src/task/options.dart'; | 13 import 'package:analyzer/src/task/options.dart'; |
| 11 import 'package:yaml/yaml.dart'; | 14 import 'package:yaml/yaml.dart'; |
| 12 | 15 |
| 13 /// String identifiers mapped to associated severities. | 16 /// String identifiers mapped to associated severities. |
| 14 const Map<String, ErrorSeverity> severityMap = const { | 17 const Map<String, ErrorSeverity> severityMap = const { |
| 15 'error': ErrorSeverity.ERROR, | 18 'error': ErrorSeverity.ERROR, |
| 16 'info': ErrorSeverity.INFO, | 19 'info': ErrorSeverity.INFO, |
| 17 'warning': ErrorSeverity.WARNING | 20 'warning': ErrorSeverity.WARNING |
| 18 }; | 21 }; |
| 19 | 22 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ErrorCode errorCode = error.errorCode; | 128 ErrorCode errorCode = error.errorCode; |
| 126 if (errorCode is StaticTypeWarningCode) { | 129 if (errorCode is StaticTypeWarningCode) { |
| 127 return true; | 130 return true; |
| 128 } | 131 } |
| 129 if (errorCode is StaticWarningCode) { | 132 if (errorCode is StaticWarningCode) { |
| 130 return errorCode.isStrongModeError; | 133 return errorCode.isStrongModeError; |
| 131 } | 134 } |
| 132 return false; | 135 return false; |
| 133 } | 136 } |
| 134 } | 137 } |
| OLD | NEW |