class Rubocop::Formatter::ClangStyleFormatter

This formatter formats report data in clang style. The precise location of the problem is shown together with the relevant source code.

Public Instance Methods

report_file(file, offences) click to toggle source
# File lib/rubocop/formatter/clang_style_formatter.rb, line 9
def report_file(file, offences)
  offences.each do |o|
    output.printf("%s:%d:%d: %s: %s\n",
                  smart_path(file).color(:cyan), o.line, o.real_column,
                  o.clang_severity, o.message)
    output.puts(o.location.source_line)
    output.puts(' ' * o.location.column +
                '^' * o.location.column_range.count)
  end
end