Class: RuboCop::Discourse::Plugin

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

Instance Method Summary collapse

Instance Method Details

#aboutObject



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

def about
  LintRoller::About.new(
    name: "rubocop-discourse",
    version: RuboCop::Discourse::VERSION,
    homepage: "https://github.com/discourse/rubocop-discourse",
    description: "Custom rubocop cops used by Discourse",
  )
end

#rules(_context) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/rubocop/discourse/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/discourse/plugin.rb', line 15

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