def run(document)
      @document = document
      @lints = []
      visit(document.tree)
      @lints
    rescue Parser::SyntaxError => e
      location = e.diagnostic.location
      @lints <<
        HamlLint::Lint.new(
          HamlLint::Linter::Syntax.new(config),
          document.file,
          location.line,
          e.to_s,
          :error
        )
    end
def run(document)
      @document = document
      @lints = []
      visit(document.tree)
      @lints
    rescue Parser::SyntaxError => e
      location = e.diagnostic.location
      @lints <<
        HamlLint::Lint.new(
          HamlLint::Linter::Syntax.new(config),
          document.file,
          location.line,
          e.to_s,
          :error
        )
    end
Initializes a linter with the specified configuration.

 @param config [Hash] configuration for this linter
 Runs the linter against the given Haml document.

 @param document [HamlLint::Document]