Class: HamlLint::Linter::AlignmentTabs
- Inherits:
-
HamlLint::Linter
- Object
- HamlLint::Linter
- HamlLint::Linter::AlignmentTabs
- Defined in:
- lib/haml_lint/linter/alignment_tabs.rb
Overview
Checks for tabs that are placed for alignment of tag content
Constant Summary collapse
- REGEX =
/[^\s*]\t+/.freeze
Instance Attribute Summary
Attributes inherited from HamlLint::Linter
Instance Method Summary collapse
Methods inherited from HamlLint::Linter
#initialize, #name, #run, #run_or_raise, supports_autocorrect?, #supports_autocorrect?
Methods included from HamlVisitor
Constructor Details
This class inherits a constructor from HamlLint::Linter
Instance Method Details
#visit_tag(node) ⇒ Object
8 9 10 11 12 |
# File 'lib/haml_lint/linter/alignment_tabs.rb', line 8 def visit_tag(node) if REGEX.match?(node.source_code) record_lint(node, 'Avoid using tabs for alignment') end end |