jAnalysisSuite – A Static Analysis Toolkit

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:

<target name="analyze" depends="compile">

  


<property name="jar.name" value="jAnalysisSuite-1.0.1.jar"> <taskdef resource="staticanalysis.properties" classpath="${jar.name}"/> <setupAnalysis jar="${jar.name}" quiet="true"/> <addAnalysisItem srcdir="${src.dir}"  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}"/> <performStaticAnalysis todir="reports" basename="report_"> <checkstyle/> <cpd/> <jdepend /> <javancss /> <testabilityexplorer /> <pmd/> <findbugs /> <emma filter="com.peterfranza.*"/> <JUnit /> </performStaticAnalysis> </target>

</p>

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