Evolving Software

Download: http://javaanalysissuite.googlecode.com/files/jAnalysisSuite-{latest}.jar
Project Home: http://code.google.com/p/javaanalysissuite/

What is it?

The jAnalysisSuite is a set of ant tasks that simplifies the task of integrating multiple static analysis tools into your projects build cycle. Often I find that a single static analysis tool is not enough to because they all look at different aspects of your code. So in every project I find that I have configured (time and time again) a suite of tools and have littered my build path with jars and parameters.

JAnalysisSuite is a toolkit that provides a single jar and a single set of ant tasks that will create findbugs, checkstyle, pmd, jDepend and javaNcss xml reports for one or more modules in your build.  All with minimal configuration.

Tools Integrated:

Usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<target name="analyze" depends="compile">
 
  <!-- define the task set --><br />  
<property name="jar.name" value="jAnalysisSuite-1.0.1.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}"&nbsp;&nbsp;builddir="${classes.dir}"/>
           <addanalysisitem srcdir="${src2.dir}" builddir="${classes2.dir}">
           <addanalysisitem srcdir="${src3.dir}" builddir="${classes3.dir}">
 
           <addAnalysisItem srcdir="${src4.dir}" builddir="${classes4.dir}" testdir="${test4.dir}"/>
 
	        <!-- run the analysis -->
	        <performStaticAnalysis  todir="reports" basename="report_">
	        	<checkstyle/>
	        	<cpd/>
	        	<jdepend />
	        	<javancss />
	        	<testabilityexplorer />
	        	<pmd/>
	        	<findbugs />
	        	<emma filter="com.peterfranza.*"/>
	        	<JUnit />
 
	        </performStaticAnalysis>
 
</target>

Optional Configuration:
See project page for configuration options link

Changes

Version 1.0.1

  • Support for JavaNCSS tool

Version 1.0.0

  • Changed task configuration schema to support a growing number of tools
  • Added support to testability explorer
  • Added support for JUnit
  • Added support for EMMA code coverage
  • Updated findbugs
  • Updated PMD/CPD
  • Updated Checkstyle

Pre-Version 1.0.0

  • Support for Findbugs tool
  • Support for Checkstyle tool
  • Support for PMD tool
  • Support for JDepend tool
  • Support for CPD tool