def output_html_errors
      require 'erubis'
      template = @options['template'] ? File.read(File.expand_path(@options['template'])) : File.read(File.join(File.dirname(__FILE__), '..', '..', 'assets', 'result.html.erb'))

      if @options['with-github']
        last_commit_id = @options['last-commit-id'] || `cd #{@runner.class.base_path} && git rev-parse HEAD`.chomp
        unless @options['github-name'].start_with?('https')
          @options['github-name'] = GITHUB_URL + @options['github-name']
        end
      end
      File.open(@options['output-file'], 'w+') do |file|
        eruby = Erubis::Eruby.new(template)
        file.puts eruby.evaluate(
          errors: errors,
          error_types: error_types,
          textmate: @options['with-textmate'],
          sublime: @options['with-sublime'],
          mvim: @options['with-mvim'],
          github: @options['with-github'],
          github_name: @options['github-name'],
          last_commit_id: last_commit_id,
          git: @options['with-git'],
          hg: @options['with-hg']
        )
      end
    end
def output_html_errors
      require 'erubis'
      template = @options['template'] ? File.read(File.expand_path(@options['template'])) : File.read(File.join(File.dirname(__FILE__), '..', '..', 'assets', 'result.html.erb'))

      if @options['with-github']
        last_commit_id = @options['last-commit-id'] || `cd #{@runner.class.base_path} && git rev-parse HEAD`.chomp
        unless @options['github-name'].start_with?('https')
          @options['github-name'] = GITHUB_URL + @options['github-name']
        end
      end
      File.open(@options['output-file'], 'w+') do |file|
        eruby = Erubis::Eruby.new(template)
        file.puts eruby.evaluate(
          errors: errors,
          error_types: error_types,
          textmate: @options['with-textmate'],
          sublime: @options['with-sublime'],
          mvim: @options['with-mvim'],
          github: @options['with-github'],
          github_name: @options['github-name'],
          last_commit_id: last_commit_id,
          git: @options['with-git'],
          hg: @options['with-hg']
        )
      end
    end
output errors with html format.