Class: RuboCop::Formatter::FileListFormatter

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: RuboCop::Formatter::BaseFormatter
Defined in: lib/rubocop/formatter/file_list_formatter.rb


This formatter displays just a list of the files with offenses in them, separated by newlines. The output is machine-parsable.

Here’s the format:

/some/file /some/other/file

Class Method Summary

BaseFormatter - Inherited

Instance Attribute Summary

Instance Method Summary

BaseFormatter - Inherited


Invoked at the end of inspecting each files.


Invoked at the beginning of inspecting each files.


Invoked after all files are inspected or interrupted by user.


Invoked once before any files are inspected.

Constructor Details

This class inherits a constructor from RuboCop::Formatter::BaseFormatter

Instance Method Details

#file_finished(file, offenses)

[ GitHub ]

# File 'lib/rubocop/formatter/file_list_formatter.rb', line 13

def file_finished(file, offenses)
  return if offenses.empty?

  output.printf("%<path>s\n", path: file)