Adding CheckStyle Report

You are viewing an old version (v. 2) of this page.
The latest version is v. 28, last edited on Aug 06, 2009 (view differences | )
<< View previous version | view page history | view next version >>

To add CheckStyle report, only need two steps:

  1. Generate CheckStyle XML report from Ant or Maven or any other build tools.
  2. Publish CheckStyle report in the configuration.

Generate CheckStyle Report

QuickBuild will NOT generate CheckStyle report automatically, so first make sure the CheckStyle report is produced by ANT or by any other build tools, the following example shows how to generate CheckStyle XML report by Ant JUnit task:

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>

After adding generate the XML report for your source code, you can tell QuickBuild to add those results now.

Publish CheckStyle Report

Just like all other build reports, to add CheckStyle report is by [adding a publish step] in a configuration. When you add publish CheckStyle Report step, the following screen will be displayed:

Unable to render embedded object: File (checkstyle_step.png) not found.

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] 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.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.