Class: RuboCop::Sorbet::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Sorbet::Plugin
- Defined in:
- lib/rubocop/sorbet/plugin.rb
Overview
A plugin that integrates RuboCop Sorbet with RuboCop’s plugin system.
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/rubocop/sorbet/plugin.rb', line 11 def about LintRoller::About.new( name: "rubocop-sorbet", version: VERSION, homepage: "https://github.com/Shopify/rubocop-sorbet", description: "A collection of Rubocop rules for Sorbet.", ) end |
#rules(_context) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/rubocop/sorbet/plugin.rb', line 24 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
20 21 22 |
# File 'lib/rubocop/sorbet/plugin.rb', line 20 def supported?(context) context.engine == :rubocop end |