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