Class: RuboCop::Petal::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Petal::Plugin
- Defined in:
- lib/rubocop/petal/plugin.rb
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/rubocop/petal/plugin.rb', line 8 def about LintRoller::About.new( name: 'rubocop-petal', version: VERSION, homepage: 'https://github.com/petalmd/rubocop-petal', description: 'Petal global cops configuration' ) end |
#rules(_context) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/rubocop/petal/plugin.rb', line 21 def rules(_context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: Pathname.new(__dir__).join('../../../config/default.yml') ) end |
#supported?(context) ⇒ Boolean
17 18 19 |
# File 'lib/rubocop/petal/plugin.rb', line 17 def supported?(context) context.engine == :rubocop end |