Sha256: a6551d867e06ee8ff7e17ff9e51adf1e5b797940b61e9b6ecec6aab5e2a1c9e0

Contents?: true

Size: 593 Bytes

Versions: 4

Compression:

Stored size: 593 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Formatter
    # This formatter displays the report data in format that's
    # easy to process in the Emacs text editor.
    # The output is machine-parsable.
    class EmacsStyleFormatter < BaseFormatter
      def file_finished(file, offenses)
        offenses.each do |o|
          message = o.corrected? ? '[Corrected] ' : ''
          message << o.message

          output.printf("%s:%d:%d: %s: %s\n",
                        file, o.line, o.real_column, o.severity.code,
                        message)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.22.0 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.21.0 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.20.1 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.20.0 lib/rubocop/formatter/emacs_style_formatter.rb