Class: RuboCop::Performance::Plugin
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
LintRoller::Plugin
|
|
Instance Chain:
self,
LintRoller::Plugin
|
|
Inherits: |
LintRoller::Plugin
|
Defined in: | lib/rubocop/performance/plugin.rb |
Overview
A plugin that integrates RuboCop Performance with RuboCop’s plugin system.
Instance Method Summary
Instance Method Details
#about
[ GitHub ]# File 'lib/rubocop/performance/plugin.rb', line 9
def about LintRoller::About.new( name: 'rubocop-performance', version: Version::STRING, homepage: 'https://github.com/rubocop/rubocop-performance', description: 'A collection of RuboCop cops to check for performance optimizations in Ruby code.' ) end
#rules(_context)
[ GitHub ]# File 'lib/rubocop/performance/plugin.rb', line 22
def rules(_context) project_root = Pathname.new(__dir__).join('../../..') ConfigObsoletion.files << project_root.join('config', 'obsoletion.yml') LintRoller::Rules.new(type: :path, config_format: :rubocop, value: project_root.join('config', 'default.yml')) end
#supported?(context) ⇒ Boolean
# File 'lib/rubocop/performance/plugin.rb', line 18
def supported?(context) context.engine == :rubocop end