changes.
| 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|1. 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|Publish Build Reports], to add CheckStyle report is by [adding a publish step|Working With Step] in a [configuration|1. Working with Configuration]. When you add publish CheckStyle Report step, the following screen will be displayed: |
| | Just like all other [build reports|3. Publish Build Reports], to add CheckStyle report is by [adding a publish step|Working With Step] in a [configuration|1. 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. |