Class: RuboCop::Kanso::Plugin

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

Instance Method Summary collapse

Instance Method Details

#aboutObject



6
7
8
9
10
11
12
13
# File 'lib/rubocop/kanso/plugin.rb', line 6

def about
  LintRoller::About.new(
    name: 'rubocop-kanso',
    version: VERSION,
    homepage: 'https://github.com/egracens/rubocop-kanso',
    description: 'RuboCop extension focusing on simplicity and eliminating redundancy.'
  )
end

#rules(_context) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/rubocop/kanso/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:



15
16
17
# File 'lib/rubocop/kanso/plugin.rb', line 15

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