Class: RuboCop::Yardoc::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Yardoc::Plugin
- Defined in:
- lib/rubocop/yardoc/plugin.rb
Overview
A plugin that integrates RuboCop Yardoc with RuboCop's plugin system.
Instance Method Summary collapse
-
#about ⇒ Object
Information about the plugin.
-
#rules(_context) ⇒ Object
Rules configuration.
-
#supported?(context) ⇒ Boolean
Whether the plugin can run in given context.
Instance Method Details
#about ⇒ Object
Information about the plugin
11 12 13 14 15 16 17 18 |
# File 'lib/rubocop/yardoc/plugin.rb', line 11 def about LintRoller::About.new( name: 'rubocop-yardoc', version: RuboCop::Yardoc::VERSION, homepage: '__FIXME__', description: 'A collection of RuboCop cops to check for Yardoc documentation.' ) end |
#rules(_context) ⇒ Object
Rules configuration
30 31 32 33 34 35 36 |
# File 'lib/rubocop/yardoc/plugin.rb', line 30 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
Whether the plugin can run in given context
23 24 25 |
# File 'lib/rubocop/yardoc/plugin.rb', line 23 def supported?(context) context.engine == :rubocop end |