Class: RuboCop::RailsCTO::Plugin

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

Instance Method Summary collapse

Instance Method Details

#aboutObject



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

def about
  LintRoller::About.new(
    name: "rails-cto",
    version: ::RailsCTO::VERSION,
    homepage: "https://github.com/mattsears/rails-cto-gem",
    description: "RuboCop cops for the rails-cto Claude plugin."
  )
end

#rules(_context) ⇒ Object



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

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

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


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

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