Class: RuboCop::RSpec::Extra::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::RSpec::Extra::Plugin
- Defined in:
- lib/rubocop/rspec/extra/plugin.rb
Overview
A plugin that integrates RuboCop RSpec Extra with RuboCop's plugin system.
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rubocop/rspec/extra/plugin.rb', line 10 def about LintRoller::About.new( name: "rubocop-rspec-extra", version: Version::STRING, homepage: "https://github.com/ydah/rubocop-rspec-extra", description: "A RuboCop extension focused on enforcing RSpec. A place where no one is officially employed, but where useful cops can gather." ) end |
#rules(_context) ⇒ Object
23 24 25 26 27 |
# File 'lib/rubocop/rspec/extra/plugin.rb', line 23 def rules(_context) project_root = Pathname.new(__dir__).join("../../../..") LintRoller::Rules.new(type: :path, config_format: :rubocop, value: project_root.join("config", "default.yml")) end |
#supported?(context) ⇒ Boolean
19 20 21 |
# File 'lib/rubocop/rspec/extra/plugin.rb', line 19 def supported?(context) context.engine == :rubocop end |