Class: RuboCop::Cop::TypeToolkit::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Cop::TypeToolkit::Plugin
- Defined in:
- lib/rubocop/cop/type_toolkit/plugin.rb
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/rubocop/cop/type_toolkit/plugin.rb', line 11 def about LintRoller::About.new( name: "rubocop-type_toolkit", version: ::TypeToolkit::VERSION, homepage: "https://github.com/Shopify/type_toolkit", description: "RuboCop rules for Type Toolkit.", ) end |
#rules(_context) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/rubocop/cop/type_toolkit/plugin.rb', line 24 def rules(_context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: Pathname.new(__dir__).join("../../../../config/default.yml"), ) end |
#supported?(context) ⇒ Boolean
20 21 22 |
# File 'lib/rubocop/cop/type_toolkit/plugin.rb', line 20 def supported?(context) context.engine == :rubocop end |