Class: Rubocop::Report::EmacsStyle

Inherits:
PlainText show all
Defined in:
lib/rubocop/report/emacs_style.rb

Overview

Plain text report, suitable for display in Emacs compilation buffers.

Instance Attribute Summary

Attributes inherited from Report

#filename

Instance Method Summary collapse

Methods inherited from PlainText

#display

Methods inherited from Report

#<<, #empty?, #entries, #initialize

Constructor Details

This class inherits a constructor from Rubocop::Report::Report

Instance Method Details

#generateObject

Generates a string representation of the report



8
9
10
11
12
13
14
# File 'lib/rubocop/report/emacs_style.rb', line 8

def generate
  report = entries.map do |e|
    sprintf('%s:%d: %s: %s', @filename,
            e.line_number, e.encode_severity, e.message)
  end
  report.join("\n")
end