Class: RuboCop::Spinel::Plugin

Inherits:
LintRoller::Plugin
  • Object
show all
Defined in:
lib/rubocop/spinel/plugin.rb

Instance Method Summary collapse

Instance Method Details

#aboutObject



8
9
10
11
12
13
14
15
# File 'lib/rubocop/spinel/plugin.rb', line 8

def about
  LintRoller::About.new(
    name: "rubocop_spinel",
    version: VERSION,
    homepage: "https://github.com/gurgeous/rubocop_spinel",
    description: "Custom RuboCop cops for Spinel compatibility."
  )
end

#rules(_context) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/rubocop/spinel/plugin.rb', line 19

def rules(_context)
  LintRoller::Rules.new(
    type: :path,
    config_format: :rubocop,
    value: Pathname.new(__dir__).join("../../../config/default.yml")
  )
end

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


17
# File 'lib/rubocop/spinel/plugin.rb', line 17

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