In addition to PMD and JavaNCSS, there are other equally interesting tools, which report various complexity related metrics. Check out:
CheckStyle - http://checkstyle.sourceforge.net/ which has a few code size related rules
Eclipse Metrics plug-in - http://metrics.sourceforge.net/ reports size violations
Hammurapi- http://www.hammurapi.biz/hammurapi-biz/ef/xmenu/downloads.html has a wealth of rules too
Also, for more information on PMD, check out Tom Copeland's PMD Applied book at http://pmdapplied.com/
This topic has been locked.
8 replies Latest Post - 2007-06-13T16:07:31Z by nagkumar
Pinned topic Additional static analysis tools
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2007-06-13T16:07:31Z at 2007-06-13T16:07:31Z by nagkumar
Re: Additional static analysis tools2006-07-13T14:03:25Z in response to SystemAdminHi Andy,
Usefull list ! I was used to Checkstyle but it allows me to discover more tools.
Regarding metrics, I'm also using the eclipse plugin called "metrics", which gives me more information (but no rules checking).
Checkstyle plugin + metrics plugin is imho a good set of tool to start.
But I'm still looking for an Open Source program calculating essential cyclomatic complexity ev(G) and not only v(g). Of course, It's better if it integrated inside eclipse ;-)
Does anyone is aware of such a program ?
Re: Additional static analysis tools2006-07-14T18:06:28Z in response to SystemAdminYup, that's been a pending RFE for a while for PMD:
Just need to take the time to implement it. As Andy said, shouldn't be too hard, just a matter of buckling down to it.
Re: Additional static analysis tools2006-07-18T13:59:40Z in response to SystemAdminHi Tom and Andy,
Thanks for your reply.
Implementing cyclomatic complexity is pretty straight forward as you can easily based your calculation method on source text. Essential complexity seems more complicated as it involves graph theory. One can not use only a source tree like antlr or bcel library. Am I wrong ? Therefore, whether ev(G) is done, others structural metrics like iv(G) should then be pretty easy to add, isn't it ?
Re: Additional static analysis tools2006-07-18T20:12:31Z in response to SystemAdminHm, that's true. PMD builds a DFA graph, but it's not complete, for example:
Pretty close, though...
Re: Additional static analysis tools2007-01-02T14:51:02Z in response to SystemAdminPlease also check out TorqueWrench, a static analysis tool for Java: http://www.stackframe.com/TorqueWrench/
TorqueWrench is developed by my company, StackFrame, LLC, and we would appreciate feedback.
Re: Additional static analysis tools2007-01-24T02:54:25Z in response to SystemAdminCheck out Paul Duvall's Automation for the people: Improving code with Eclipse plugins at http://www-128.ibm.com/developerworks/java/library/j-ap01117/index.html for additional tools. Also see this blog entry for a few more plugins: http://www.jacoozi.com/blog/?p=9
nagkumar 120000NBPN3 PostsACCEPTED ANSWER
Re: Additional static analysis tools2007-06-13T16:07:31Z in response to SystemAdminHi
Try http://www.hello2morrow.com/en/sonarj/sonarj.php. This is not opensource but has a very good cyclometric measurment for the entire project.
Raja Nagendra Kumar,
Competant and Reliable Offshore Code Varification Partners.