Class: Rubocop::Rspec::Unused::Let::Plugin

Inherits:
LintRoller::Plugin
  • Object
show all
Defined in:
lib/rubocop/rspec/unused/let/plugin.rb,
sig/rubocop/rspec/unused/let/plugin.rbs

Overview

A RuboCop plugin (LintRoller) that registers this gem's cops and default configuration. Referenced from the gemspec via the default_lint_roller_plugin metadata, so users can enable it with:

plugins:
- rubocop-rspec
- rubocop-rspec-unused-let

Instance Method Summary collapse

Instance Method Details

#aboutObject



18
19
20
21
22
23
24
25
# File 'lib/rubocop/rspec/unused/let/plugin.rb', line 18

def about
  LintRoller::About.new(
    name: "rubocop-rspec-unused-let",
    version: VERSION,
    homepage: "https://github.com/tk0miya/rubocop-rspec-unused-let",
    description: "Detects unreferenced RSpec `let` definitions."
  )
end

#rules(_context) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/rubocop/rspec/unused/let/plugin.rb', line 33

def rules(_context)
  LintRoller::Rules.new(
    type: :path,
    config_format: :rubocop,
    value: CONFIG_DEFAULT
  )
end

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/rubocop/rspec/unused/let/plugin.rb', line 28

def supported?(context)
  context.engine == :rubocop
end