def check_width(width, root)
      dummy_node = Struct.new(:line)

      root.children.each do |top_node|
        # once we've found one line with leading space, there's no need to check any more lines
        # `haml` will check indenting_at_start, deeper_indenting, inconsistent_indentation
        break if top_node.children.find do |node|
          line = node.source_code
          leading_space = LEADING_SPACES_REGEX.match(line)

          break unless leading_space && !node.disabled?(self)

          if leading_space[1] != ' ' * width
            record_lint dummy_node.new(node.line), "File does not use #{width}-space indentation"
          end

          break true
        end
      end
    end
def check_width(width, root)
      dummy_node = Struct.new(:line)

      root.children.each do |top_node|
        # once we've found one line with leading space, there's no need to check any more lines
        # `haml` will check indenting_at_start, deeper_indenting, inconsistent_indentation
        break if top_node.children.find do |node|
          line = node.source_code
          leading_space = LEADING_SPACES_REGEX.match(line)

          break unless leading_space && !node.disabled?(self)

          if leading_space[1] != ' ' * width
            record_lint dummy_node.new(node.line), "File does not use #{width}-space indentation"
          end

          break true
        end
      end
    end
validate that indentation matches config width (only for spaces)