Method: RuboCop::Formatter::OffenseCountFormatter#report_summary
- Defined in:
- lib/rubocop/formatter/offense_count_formatter.rb
#report_summary(offense_counts, offending_files_count) ⇒ Object
rubocop:disable Metrics/AbcSize
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/rubocop/formatter/offense_count_formatter.rb', line 56 def report_summary(offense_counts, offending_files_count) per_cop_counts = ordered_offense_counts(offense_counts) total_count = total_offense_count(offense_counts) output.puts column_width = total_count.to_s.length + 2 per_cop_counts.each do |cop_name, count| output.puts "#{count.to_s.ljust(column_width)}#{cop_information(cop_name)}" end output.puts '--' output.puts "#{total_count} Total in #{offending_files_count} files" output.puts end |