| 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.src.task.options; | 5 library analyzer.src.task.options; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/plugin/options.dart'; | 8 import 'package:analyzer/plugin/options.dart'; |
| 9 import 'package:analyzer/source/analysis_options_provider.dart'; | 9 import 'package:analyzer/source/analysis_options_provider.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 new ListResultDescriptor<AnalysisError>( | 23 new ListResultDescriptor<AnalysisError>( |
| 24 'ANALYSIS_OPTIONS_ERRORS', AnalysisError.NO_ERRORS); | 24 'ANALYSIS_OPTIONS_ERRORS', AnalysisError.NO_ERRORS); |
| 25 | 25 |
| 26 /// `analyzer` analysis options constants. | 26 /// `analyzer` analysis options constants. |
| 27 class AnalyzerOptions { | 27 class AnalyzerOptions { |
| 28 static const String errors = 'errors'; | 28 static const String errors = 'errors'; |
| 29 static const String exclude = 'exclude'; | 29 static const String exclude = 'exclude'; |
| 30 static const String plugins = 'plugins'; | 30 static const String plugins = 'plugins'; |
| 31 static const String strong_mode = 'strong-mode'; | 31 static const String strong_mode = 'strong-mode'; |
| 32 | 32 |
| 33 /// Ways to say `ignore`. |
| 34 static const List<String> ignoreSynonyms = const ['ignore', 'false']; |
| 35 |
| 33 /// Supported top-level `analyzer` options. | 36 /// Supported top-level `analyzer` options. |
| 34 static const List<String> top_level = const [ | 37 static const List<String> top_level = const [ |
| 35 errors, | 38 errors, |
| 36 exclude, | 39 exclude, |
| 37 plugins, | 40 plugins, |
| 38 strong_mode | 41 strong_mode |
| 39 ]; | 42 ]; |
| 40 } | 43 } |
| 41 | 44 |
| 42 /// Validates `analyzer` top-level options. | 45 /// Validates `analyzer` top-level options. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION, | 170 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION, |
| 168 k.span, | 171 k.span, |
| 169 [pluginName, k.value]); | 172 [pluginName, k.value]); |
| 170 } | 173 } |
| 171 } | 174 } |
| 172 //TODO(pq): consider an error if the node is not a Scalar. | 175 //TODO(pq): consider an error if the node is not a Scalar. |
| 173 }); | 176 }); |
| 174 } | 177 } |
| 175 } | 178 } |
| 176 } | 179 } |
| OLD | NEW |