Publish CheckStyle Report

Version 4 by Steve Luo
on May 26, 2008 22:38.


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 10 changes. View first change.

 To add [CheckStyle|http://checkstyle.sourceforge.net] report, only need two steps:
 # Generate CheckStyle *XML* report from [Ant|http://ant.apache.org] or [Maven|http://maven.apache.org] or any other build tools.
 # Publish CheckStyle report in the [configuration|Configuration].
  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.
 # 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 tools, the following example shows how to generate CheckStyle XML report by [Ant JUnit task|http://ant.apache.org/manual/OptionalTasks/junit.html]:
  
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">
  <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.
  
After adding generate the XML report for your source code, you can tell QuickBuild to add those results now.
  
 h2. Publish CheckStyle Report
Just like all other [build reports|Publishing Build Reports], to add CheckStyle report is by [adding a publish step|Add Step] in a [configuration|Configuration]. When you add publish CheckStyle Report step, the following screen will be displayed:
  
!checkstyle_step.png!
  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:
  
In source report files field, QuickBuild use Ant style file patterns to collect the reports, and the directory you specified is *relative* to the [workspace|Workspace Directory] directory.
  !Screenshots^report_publish_step.png!
  
 Now, QuickBuild will analyze the CheckStyle report and will generate the Overview/Details after each build, and also will generate the statistics for them.
  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.