Agreed; it depends on what you mean by "code review". To me, a "code review" is a collaborative gathering of people's opinions about the code, potential issues, and things like that--something automated tools can't really do (although FindBugs can... well, find bugs, and Checkstyle can enforce coding standards, and PMD does a bit of both).
Joined: Mar 12, 2009
Thanks Joachim and David,
I'm looking for a code review tool which will check the coding standards,efficient use of the data structures, check if the code is optimised. If there is some unused variable etc. I tried PMD bug unfortunately the binary for that is continuously crashing. Also Findbugs doesnt generate a report(please correct me if I'm wrong).
I also tried downloading Hammurapi, but the same problem that the executable is crashing
I've started to use Sonar at both work and at home. Very useful for:
identifying standard "problems" as per FindBugs and PMD (e.g. unused variables)
identifying duplicated code
identifying too complex code
Note that it is a relatively heavyweight application, and by default it requires your projects to use Maven (although there is a way around that by using a Hudson Sonar plugin).
Hudson itself has many plugins that will give you some of the reports that Sonar provides. But not all of them. I tend to use Hudson as my CI tool with Sonar triggered by Hudson each night (the creators of Sonar recommend it run as a daily build).
FindBugs does generate reports in many formats - take a look at this sample report on the JBoss codebase as an example. Personally I don't like the way they do reports - it is non intuitive to me that the top 4 items work as tabs that you can click on, or that there is drill-down information on some screens (e.g. the "List bugs by bug category" screen). I tend to use FindBugs within Eclipse itself (there are plugins for most IDEs) and also generate a more generic XML report from the standalone FindBugs report that Hudson understands and can incorporate into it's daily build information.
Sorry to dredge up this old post but you can use Hudson and Serenity(http://wiki.hudson-ci.org/display/HUDSON/Serenity+Plugin) for code coverage, complexity, dependency, abstractness and distance. And of course FindBugs plugs in to Hudson as well, the two together will give you more than enough metrics to judge the code quality.