Class: RuboCop::Chromebrew::Plugin

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

Instance Method Summary collapse

Instance Method Details

#aboutObject



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

def about
  LintRoller::About.new(
    name: 'rubocop-chromebrew',
    version: '0.0.4',
    homepage: 'https://github.com/chromebrew/rubocop-chromebrew',
    description: 'A RuboCop extension for Chromebrew-specific practices.'
  )
end

#rules(_context) ⇒ Object



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


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

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