Class: HamlLint::Linter::RubyComments
- Inherits:
-
Linter
- Object
- Linter
- HamlLint::Linter::RubyComments
- Includes:
- HamlLint::LinterRegistry
- Defined in:
- lib/haml_lint/linter/ruby_comments.rb
Overview
Checks for Ruby comments that can be written as Haml comments.
Instance Method Summary collapse
Methods included from HamlLint::LinterRegistry
extract_linters_from, included
Instance Method Details
#visit_silent_script(node) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/haml_lint/linter/ruby_comments.rb', line 10 def visit_silent_script(node) return unless code_comment?(node) corrected = correct_comment(node) record_lint(node, 'Use `-#` for comments instead of `- #`', corrected: corrected) end |