| 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 /// Support for client code that wants to consume options contributed to the | 5 /// Support for client code that wants to consume options contributed to the |
| 6 /// analysis options file. | 6 /// analysis options file. |
| 7 library analyzer.plugin.options; | 7 library analyzer.plugin.options; |
| 8 | 8 |
| 9 import 'package:analyzer/error/listener.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | |
| 11 import 'package:analyzer/src/plugin/options_plugin.dart'; | 11 import 'package:analyzer/src/plugin/options_plugin.dart'; |
| 12 import 'package:plugin/plugin.dart'; | 12 import 'package:plugin/plugin.dart'; |
| 13 import 'package:yaml/yaml.dart'; | 13 import 'package:yaml/yaml.dart'; |
| 14 | 14 |
| 15 /// The identifier of the extension point that allows plugins to access | 15 /// The identifier of the extension point that allows plugins to access |
| 16 /// options defined in the analysis options file. The object used as an | 16 /// options defined in the analysis options file. The object used as an |
| 17 /// extension must be an [OptionsProcessor]. | 17 /// extension must be an [OptionsProcessor]. |
| 18 final String OPTIONS_PROCESSOR_EXTENSION_POINT_ID = Plugin.join( | 18 final String OPTIONS_PROCESSOR_EXTENSION_POINT_ID = Plugin.join( |
| 19 OptionsPlugin.UNIQUE_IDENTIFIER, | 19 OptionsPlugin.UNIQUE_IDENTIFIER, |
| 20 OptionsPlugin.OPTIONS_PROCESSOR_EXTENSION_POINT); | 20 OptionsPlugin.OPTIONS_PROCESSOR_EXTENSION_POINT); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 /// Validates options as defined in an analysis options file. | 75 /// Validates options as defined in an analysis options file. |
| 76 /// | 76 /// |
| 77 /// Clients may implement this class when implementing plugins. | 77 /// Clients may implement this class when implementing plugins. |
| 78 /// | 78 /// |
| 79 /// See [OptionsProcessor] for a description of the options file format. | 79 /// See [OptionsProcessor] for a description of the options file format. |
| 80 /// | 80 /// |
| 81 abstract class OptionsValidator { | 81 abstract class OptionsValidator { |
| 82 /// Validate [options], reporting any errors to the given [reporter]. | 82 /// Validate [options], reporting any errors to the given [reporter]. |
| 83 void validate(ErrorReporter reporter, Map<String, YamlNode> options); | 83 void validate(ErrorReporter reporter, Map<String, YamlNode> options); |
| 84 } | 84 } |
| OLD | NEW |