123456789_123456789_123456789_123456789_123456789_

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

Overview

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

#file_finished

Invoked at the end of inspecting each files.

#file_started

Invoked at the beginning of inspecting each files.

#finished

Invoked after all files are inspected or interrupted by user.

#started

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)
end