Class: RuboCop::Sumi::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Sumi::Plugin
- Defined in:
- appendix/lib/rubocop/sumi/plugin.rb
Overview
Connects Sumi's .sumi 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 'appendix/lib/rubocop/sumi/plugin.rb', line 15 def about LintRoller::About.new( name: "sumi-appendix", version: ::Sumi::Appendix::VERSION, homepage: "https://sumi.alef.tr", description: "RuboCop rules for the Sumi SVG DSL" ) end |
#rules(_context) ⇒ LintRoller::Rules
Returns the RuboCop configuration bundled with this gem.
32 33 34 35 36 37 38 |
# File 'appendix/lib/rubocop/sumi/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 'appendix/lib/rubocop/sumi/plugin.rb', line 27 def supported?(context) = context.engine == :rubocop |