Sha256: e328691b0e162fbcd137d1e4b89a29a271779636008ae3bbba7a126b75aec321

Contents?: true

Size: 555 Bytes

Versions: 7

Compression:

Stored size: 555 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.
    class EmacsStyleFormatter < BaseFormatter
      def file_finished(file, offences)
        offences.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

7 entries across 7 versions & 1 rubygems

Version Path
rubocop-0.18.1 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.18.0 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.17.0 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.16.0 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.15.0 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.14.1 lib/rubocop/formatter/emacs_style_formatter.rb
rubocop-0.14.0 lib/rubocop/formatter/emacs_style_formatter.rb