Class: Standard::Base::Plugin

Inherits:
LintRoller::Plugin
  • Object
show all
Defined in:
lib/standard/base/plugin.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Plugin

Returns a new instance of Plugin.



3
4
5
# File 'lib/standard/base/plugin.rb', line 3

def initialize(config)
  @config = config
end

Instance Method Details

#aboutObject



7
8
9
10
11
12
13
14
# File 'lib/standard/base/plugin.rb', line 7

def about
  LintRoller::About.new(
    name: "standard-base",
    version: VERSION,
    homepage: "https://github.com/standardrb/standard",
    description: "Configuration for RuboCop's built-in rules"
  )
end

#rules(context) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/standard/base/plugin.rb', line 20

def rules(context)
  LintRoller::Rules.new(
    type: :path,
    config_format: :rubocop,
    value: determine_yaml_path(context.target_ruby_version)
  )
end

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/standard/base/plugin.rb', line 16

def supported?(context)
  true
end