Adding CheckStyle Report

Version 5 by Steve Luo
on May 26, 2008 22:59.


compared with
Version 6 by Robin Shen
on Jun 18, 2008 21:39.


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, 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|Working With Configuration].
  # Publish CheckStyle report in the [configuration|Working with Configuration].
  
 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]:
  
 {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 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|Working With Step] in a [configuration|Working With Configuration]. When you add publish CheckStyle Report step, the following screen will be displayed:
  Just like all other [build reports|Publishing Build Reports], to add CheckStyle report is by [adding a publish step|Working With Step] in a [configuration|Working with Configuration]. When you add publish CheckStyle Report step, the following screen will be displayed:
  
 !checkstyle_step.png!
  
 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.
  
 Now, QuickBuild will analyze the CheckStyle report and will generate the Overview/Details after each build, and also will generate the statistics for them.