Publish CheckStyle Report

compared with
Current by Robin Shen
on Aug 06, 2009 18:30.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 2 changes. View first change.

 To add [CheckStyle|http://checkstyle.sourceforge.net] report, you only need two steps:
  To publish [CheckStyle|http://checkstyle.sourceforge.net] report, you only need two steps:
 # Generate CheckStyle *XML* report from [Ant|http://ant.apache.org] or [Maven|http://maven.apache.org] or any other build tool.
 # Publish CheckStyle report in the [configuration|Working with Configurations].
  # Add Checkstyle publish step by choosing _Publish -> CheckStyle Report_ from the step menu.
  
 h2. Generate CheckStyle Report
  
 QuickBuild will NOT generate [CheckStyle|http://checkstyle.sourceforge.net] report automatically, so first make sure the CheckStyle report is produced by [ANT|http://ant.apache.org] or by any other build tool. The following example shows how to generate CheckStyle XML report by [Ant JUnit task|http://ant.apache.org/manual/OptionalTasks/junit.html]:
 {code:xml|title= CheckStyle target in build.xml}
 <target name="checkstyle" description="Check coding style">
  <taskdef resource="checkstyletask.properties">
  <classpath refid="path.lib"/>
  </taskdef>
  <checkstyle config="checkstyle_checks.xml">
  <fileset dir="${src.dir}">
  <include name="**/*.java"/>
  </fileset>
  <formatter type="xml"/> <!-- DO use xml formatter -->
  </checkstyle>
  </target>
 {code}
 After adding the target above, generate the XML report for your source code, and you can tell QuickBuild to publish the results.
  
 h2. Publish CheckStyle Report
  
 Just like all other [build reports|Publish Build Reports], to add CheckStyle report, just follow [adding a publish step|Working With Step] in a [configuration|Working with Configurations]. When you add publish CheckStyle Report step, the following screen will be displayed:
  
 !Screenshots^report_publish_step.png!
  
 In source report files field, QuickBuild uses Ant style file patterns to collect the reports, and the directory you specified is *relative* to the [workspace|Workspace Directory] directory.
  
 QuickBuild will analyze the CheckStyle report and it will generate the Overview/Details after each build, and it also will generate the statistics for the reports.