Class: RuboCop::Codeur::Plugin

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

Overview

This class represents a RuboCop Codeur plugin.

Instance Method Summary collapse

Instance Method Details

#aboutObject



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

def about
  LintRoller::About.new(
    name: 'rubocop-codeur',
    version: VERSION,
    homepage: 'https://github.com/codeur/rubocop-codeur',
    description: 'A collection of RuboCop cops to check design patterns.'
  )
end

#rules(_context) ⇒ Object



22
23
24
25
26
# File 'lib/rubocop/codeur/plugin.rb', line 22

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



18
19
20
# File 'lib/rubocop/codeur/plugin.rb', line 18

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