Sha256: 23adb64f105f94cc23e6d58ab0453e7d75d19e944fd566e45e5532f40ff73a9b

Contents?: true

Size: 593 Bytes

Versions: 2

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

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-0.19.1 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.19.0 lib/rubocop/formatter/emacs_style_formatter.rb