Module: RuboCop::Plugin Private
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Exceptions:
| |
Defined in: | lib/rubocop/plugin.rb, lib/rubocop/plugin/configuration_integrator.rb, lib/rubocop/plugin/load_error.rb, lib/rubocop/plugin/loader.rb, lib/rubocop/plugin/not_supported_error.rb |
Overview
Provides a plugin for RuboCop extensions that conform to lint_roller. https://github.com/standardrb/lint_roller
Constant Summary
-
BUILTIN_INTERNAL_PLUGINS =
Internal use only
# File 'lib/rubocop/plugin.rb', line 11{ 'rubocop-internal_affairs' => { 'enabled' => true, 'require_path' => 'rubocop/cop/internal_affairs/plugin', 'plugin_class_name' => 'RuboCop::InternalAffairs::Plugin' } }.freeze
-
INTERNAL_AFFAIRS_PLUGIN_NAME =
Internal use only
# File 'lib/rubocop/plugin.rb', line 18Plugin::BUILTIN_INTERNAL_PLUGINS.keys.first
-
OBSOLETE_INTERNAL_AFFAIRS_PLUGIN_NAME =
Internal use only
# File 'lib/rubocop/plugin.rb', line 19'rubocop/cop/internal_affairs'
Class Method Summary
- .integrate_plugins(rubocop_config, plugins) Internal use only Internal use only
- .plugin_capable?(feature_name) ⇒ Boolean Internal use only Internal use only
Class Method Details
.integrate_plugins(rubocop_config, plugins)
This method is for internal use only.
[ GitHub ]
# File 'lib/rubocop/plugin.rb', line 33
def integrate_plugins(rubocop_config, plugins) plugins = Plugin::Loader.load(plugins) ConfigurationIntegrator.integrate_plugins_into_rubocop_config(rubocop_config, plugins) plugins end
.plugin_capable?(feature_name) ⇒ Boolean
This method is for internal use only.
# File 'lib/rubocop/plugin.rb', line 22
def plugin_capable?(feature_name) return true if BUILTIN_INTERNAL_PLUGINS.key?(feature_name) return true if feature_name == OBSOLETE_INTERNAL_AFFAIRS_PLUGIN_NAME # When not using Bundler. Makes the spec available in loaded_specs but does not require it. Gem.try_activate(feature_name) return false unless (gem = Gem.loaded_specs[feature_name]) !!gem. ['default_lint_roller_plugin'] end