Class: RuboCop::Sevgi::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Sevgi::Plugin
- Defined in:
- lib/rubocop/sevgi/plugin.rb
Overview
Connects Sevgi's .sevgi rules to RuboCop's plugin system.
Instance Method Summary collapse
-
#about ⇒ LintRoller::About
Describes this plugin to lint_roller.
-
#rules(_context) ⇒ LintRoller::Rules
Returns the RuboCop configuration bundled with this gem.
-
#supported?(context) ⇒ Boolean
Reports whether this plugin supports the requested lint engine.
Instance Method Details
#about ⇒ LintRoller::About
Describes this plugin to lint_roller.
15 16 17 18 19 20 21 22 |
# File 'lib/rubocop/sevgi/plugin.rb', line 15 def about LintRoller::About.new( name: "sevgi-appendix", version: ::Sevgi::Appendix::VERSION, homepage: "https://sevgi.roktas.dev", description: "RuboCop rules for the Sevgi SVG DSL" ) end |
#rules(_context) ⇒ LintRoller::Rules
Returns the RuboCop configuration bundled with this gem.
32 33 34 35 36 37 38 |
# File 'lib/rubocop/sevgi/plugin.rb', line 32 def rules(_context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: File.("../../../rubocop/config/default.yml", __dir__) ) end |
#supported?(context) ⇒ Boolean
Reports whether this plugin supports the requested lint engine.
27 |
# File 'lib/rubocop/sevgi/plugin.rb', line 27 def supported?(context) = context.engine == :rubocop |