module RuboCop::Plugin
Provides a plugin for RuboCop
extensions that conform to lint_roller. github.com/standardrb/lint_roller @api private
Constants
- BUILTIN_INTERNAL_PLUGINS
- INTERNAL_AFFAIRS_PLUGIN_NAME
- OBSOLETE_INTERNAL_AFFAIRS_PLUGIN_NAME
Public Class Methods
Source
# File lib/rubocop/plugin.rb, line 37 def integrate_plugins(rubocop_config, plugins) plugins = Plugin::Loader.load(plugins) ConfigurationIntegrator.integrate_plugins_into_rubocop_config(rubocop_config, plugins) plugins end
Source
# 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 begin # When not using Bundler. Makes the spec available but does not require it. gem feature_name rescue Gem::LoadError # The user requested a gem that they do not have installed end return false unless (spec = Gem.loaded_specs[feature_name]) !!spec.metadata['default_lint_roller_plugin'] end