Method: RuboCop::Formatter::OffenseCountFormatter#file_finished

Defined in:
lib/rubocop/formatter/offense_count_formatter.rb

#file_finished(_file, offenses) ⇒ Object



42
43
44
45
46
47
48
49
# File 'lib/rubocop/formatter/offense_count_formatter.rb', line 42

def file_finished(_file, offenses)
  offenses.each { |o| @offense_counts[o.cop_name] += 1 }
  if options[:display_style_guide]
    offenses.each { |o| @style_guide_links[o.cop_name] ||= o.message[/ \(http\S+\)\Z/] }
  end
  @offending_files_count += 1 unless offenses.empty?
  @progressbar.increment if instance_variable_defined?(:@progressbar)
end