class RuboCop::Formatter::JUnitFormatter

def file_finished(file, offenses)

def file_finished(file, offenses)
  @inspected_file_count += 1
  # TODO: Returns all cops with the same behavior as
  # the original rubocop-junit-formatter.
  # https://github.com/mikian/rubocop-junit-formatter/blob/v0.1.4/lib/rubocop/formatter/junit_formatter.rb#L9
  #
  # In the future, it would be preferable to return only enabled cops.
  Cop::Registry.all.each do |cop|
    target_offenses = offenses_for_cop(offenses, cop)
    @offense_count += target_offenses.count
    next unless relevant_for_output?(options, target_offenses)
    add_testcase_element_to_testsuite_element(file, target_offenses, cop)
  end
end