Class: Reek::Report::XMLReport

Inherits:
Base
  • Object
show all
Defined in:
lib/reek/report/report.rb

Overview

Generates a list of smells in XML format

Constant Summary

Constants inherited from Base

Base::NO_WARNINGS_COLOR, Base::WARNINGS_COLOR

Instance Method Summary collapse

Methods inherited from Base

#add_examiner, #initialize, #smells, #smells?

Constructor Details

This class inherits a constructor from Reek::Report::Base

Instance Method Details

#showObject



148
149
150
151
152
153
154
155
156
# File 'lib/reek/report/report.rb', line 148

def show
  checkstyle = REXML::Element.new('checkstyle', document)

  smells.group_by(&:source).each do |file, file_smells|
    file_to_xml(file, file_smells, checkstyle)
  end

  print_xml(checkstyle.parent)
end