| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library analysis_server.src.plugin.linter_plugin; | |
| 6 | |
| 7 import 'package:analysis_server/src/services/linter/linter.dart'; | |
| 8 import 'package:analyzer/plugin/options.dart'; | |
| 9 import 'package:plugin/plugin.dart'; | |
| 10 | |
| 11 /// The shared linter server plugin instance. | |
| 12 final LinterServerPlugin linterServerPlugin = new LinterServerPlugin(); | |
| 13 | |
| 14 /// A plugin that defines the extension points and extensions that enhance | |
| 15 /// linting in the server. | |
| 16 class LinterServerPlugin implements Plugin { | |
| 17 /// The unique identifier of this plugin. | |
| 18 static const String UNIQUE_IDENTIFIER = 'linter.server'; | |
| 19 | |
| 20 @override | |
| 21 String get uniqueIdentifier => UNIQUE_IDENTIFIER; | |
| 22 | |
| 23 @override | |
| 24 void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) { | |
| 25 // None. | |
| 26 } | |
| 27 | |
| 28 @override | |
| 29 void registerExtensions(RegisterExtension registerExtension) { | |
| 30 // | |
| 31 // Register options validators. | |
| 32 // | |
| 33 registerExtension( | |
| 34 OPTIONS_VALIDATOR_EXTENSION_POINT_ID, new LinterRuleOptionsValidator()); | |
| 35 } | |
| 36 } | |
| OLD | NEW |