Class: RuboCop::Infinum::Plugin

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

Overview

The main plugin class for RuboCop Infinum.

Instance Method Summary collapse

Instance Method Details

#aboutObject



10
11
12
13
14
15
16
17
18
# File 'lib/rubocop/infinum/plugin.rb', line 10

def about
  LintRoller::About.new(
    name: 'rubocop-infinum',
    version: VERSION,
    homepage: 'https://github.com/infinum/rubocop-infinum',
    description: 'This plugin provides the RuboCop configuration file ' \
                 'alongside some custom cops used at Infinum.'
  )
end

#rules(_context) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/rubocop/infinum/plugin.rb', line 24

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

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/rubocop/infinum/plugin.rb', line 20

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