Class: RuboCop::Lts::Ruby::Plugin

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

Overview

LintRoller adapter that supplies this gem's API-gating rules.

Instance Method Summary collapse

Instance Method Details

#aboutObject



12
13
14
15
16
17
18
19
# File 'lib/rubocop/lts/ruby/plugin.rb', line 12

def about
  LintRoller::About.new(
    name: "rubocop-lts-ruby",
    version: VERSION,
    homepage: "https://github.com/rubocop-lts/rubocop-lts-ruby",
    description: "RuboCop cops that gate Ruby core and standard library APIs by target Ruby version."
  )
end

#rules(context) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/rubocop/lts/ruby/plugin.rb', line 25

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

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/rubocop/lts/ruby/plugin.rb', line 21

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