Class: RuboCop::DryAutoInject::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::DryAutoInject::Plugin
- Defined in:
- lib/rubocop/dry_auto_inject/plugin.rb
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rubocop/dry_auto_inject/plugin.rb', line 10 def about ::LintRoller::About.new( name: "dry-auto_inject", version: ::Dry::AutoInject::VERSION, homepage: "https://hanakai.org/learn/dry/dry-auto_inject", description: "RuboCop cops for enforcing dry-auto_inject conventions." ) end |
#rules(_context) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/rubocop/dry_auto_inject/plugin.rb', line 23 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
19 20 21 |
# File 'lib/rubocop/dry_auto_inject/plugin.rb', line 19 def supported?(context) context.engine == :rubocop end |