Class: RuboCop::Markdown::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Markdown::Plugin
- Defined in:
- lib/rubocop/markdown/plugin.rb
Overview
A plugin that integrates rubocop-md with RuboCop's plugin system.
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/rubocop/markdown/plugin.rb', line 9 def about LintRoller::About.new( name: "rubocop-md", version: VERSION, homepage: "https://github.com/rubocop/rubocop-md", description: "Run RuboCop against your Markdown files to make sure " \ "that code examples follow style guidelines." ) end |
#rules(_context) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/rubocop/markdown/plugin.rb', line 23 def rules(_context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: Pathname.new(__dir__).join("../../../config/default.yml") ) end |
#supported?(context) ⇒ Boolean
19 20 21 |
# File 'lib/rubocop/markdown/plugin.rb', line 19 def supported?(context) context.engine == :rubocop end |