class HamlLint::Linter::ViewLength
Detects overly long views.
Constants
- DummyNode
- MSG
Public Instance Methods
visit_root(root)
click to toggle source
# File lib/haml_lint/linter/view_length.rb, line 12 def visit_root(root) max = config['max'] line_count = document.last_non_empty_line node = root.children.first if line_count > max && !node.disabled?(self) record_lint(DummyNode.new(0), format(MSG, line_count, max)) end end