My favorites | Sign in
Project Home Downloads Issues Source
Project Information
Members
Featured
Downloads
Links

A single ant task that will subject your code to junit, emma, findbugs, checkstyle, pmd, jDepend, TestabilityExplorer & javaNcss without all the fuss of setting up each of these tools.

More Information @ http://www.peterfranza.com/projects/janalysissuite-a-static-analysis-toolkit/

Usage:

<target name="analyze" depends="compile">
 
   <!-- define the task set -->
   <property name="jar.name" value="jAnalysisSuite-{latest}.jar">
   <taskdef resource="staticanalysis.properties" classpath="${jar.name}"/>               
   <setupAnalysis jar="${jar.name}" quiet="true"/>
 
   <!-- add individual parts of the project to the batch -->
   <!-- do this as many times as you want for each of the different -->
   <!-- modules you wish to analyze                          -->
   <addAnalysisItem srcdir="${src.dir}"  builddir="${classes.dir}"/>
   <addanalysisitem srcdir="${src2.dir}" builddir="${classes2.dir}">
   <addanalysisitem srcdir="${src3.dir}" builddir="${classes3.dir}" testdir="${unittest.dir}">
 
	        <performStaticAnalysis  todir="reports" basename="report_">
	        	<checkstyle/>
	        	<cpd/>
	        	<jdepend />
	        	<testabilityexplorer />
	        	<pmd/>
                        <javancss/>
	        	<findbugs />
	        	<emma filter="com.peterfranza.*"/>
	        	<JUnit />	        	
	        </performStaticAnalysis>
 
</target>

The tools each support a set of configurable paramaters that can override the defaults

Checkstyle

ParameterValue
configpath to file

CPD

ParameterValue
mintokensinteger
maxmemoryinteger

Testability Explorer

ParameterValue
fiterpackage regex to remove

PMD

ParameterValue
rules"rulesets/favorites.xml"

Findbugs

ParameterValue
maxmeminteger + size i.e. 64m
timeoutinteger
effortstring
excludespath to file

Emma

ParameterValue
filterpackage regex i.e. com.peterfranza.*

JUnit

ParameterValue
includesfile regex i.e. **/*.Test.java

JavaNCss

ParameterValue
level 'package', 'object', 'function', 'all' (default: package)

Powered by Google Project Hosting