开发者

Is there a lightweight Java code metrics analyser that I can run in eclipse with Maven, Jenkins/Hudson?

I know about Sonar but I'd rather not (actually, can't) run a whole web app that says it likes 500Mb of ram just to run some reports on a build. I've already got Checkstyle, FindBugs & PMD - can I co开发者_开发百科nfigure them for the kind of metrics I'm looking for ... method length, class length, mccabe etc.? I'd also like to see (in jenkins) graphing of these over time.

Any ideas?


Crap4J offers cyclomatic complexity and, of course, CRAP.


eclipse-cs is a checkstyle plug-in for eclipse which can report on your custom checkstyle file. This can be used to setup metric checking for method length, class length, cyclomatic complexity and much more. I always run my eclipse setup with this enabled as it gives great real-time metrics.

PMD, checkstyle and findbugs all offer trending reports in their plugins for your Hudson/Jenkins build process to see trending over time. It should be an option near the bottom of your configuration on your build.


There's a JavaNCSS Maven plugin that does a lot of metrics stuff.

There's a Jenkins plugin that's supposed to generate graphs for visualization, but I was never able to get it to work.

BTW, you can also check out the core JavaNCSS tool.


For Eclipse you can take a look at the Google Analytix plugin or for Maven integration at Sonar


Is there a lightweight Java code metrics analyser that I can run in eclipse

You might want to check out http://www.eclemma.org/ or http://cobertura.sourceforge.net/ both of which I have had great sucess with in conjunction with Maven and Eclipse.


ProjectCodeMeter is around 5MB download which shows code flow complexity,SLOC,arithmetic complexity metrics and more, even estimated development time. it supports Java as well as other programming languages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜