By Kore Nordmann, first published at Mon, 05 Nov 2012 07:50:23 +0000
We, at Qafoo, do Code Reviews quite often together with our customers. This often focusses on dicussing metrics, browsing the associated code and discussing solutions for the issues found. We started using a bunch of shell scripts for that, like everyone else, but at some point we came up with a webinterface to do this in a more comfortable way. Now we want to share this tool with you.
The tool currently focuses on our use cases and probably will continue to do so. This involves getting an overview on the customers source code. There are several metrics, like Code Rank, Weighted Method per Class and alike which give you an overview on that. We found "tag clouds" and tables the best view to browse them. Of course all classes are clickable and directly lead to the related source code view:
Additionally we often want to know about especially complex parts in the application, and the distribution of complexity. For the first also Method based tag clouds for metrics like Cyclomatic Complexity and NPath Complexity exist. For the distribution we also generate charts to get a quick overview:
Want to train your skills in using software metrics, continuous integration and automated testing? Get an individual Qafoo expert training for your team!
On top of those simple metrics a combination of metrics often makes sense especially on class level. For this we included a metrics "calculator" which lists the results of formulas based on class metric to find out more sophisticated and task related issues in software:
All mentions of classes reference the respective files in the source code browser. The source code browser also contains clickable annotations, so you can directly see if some analyzer complained about a certain class, method or line of code.
You can of course also get a list of all annotations of the currently selected file:
Or you can click through the class dependencies, based on usage or inheritance connections:
It should be fairly simple to include other (custom) analyzers in this tool. By default there is also something which draws simplified class diagrams, lists issues discovered by PHPMD and the PHP Copy Paste Detector.
The software has been licensed under AGPLv3 and is available on Github. Please keep in mind that we develop this software mainly for internal use, so things might change or break. We still want to share this little gem with you. Feel free to issue pull requests, fork it or do whatever you like with it. More screenshots can also be found on github.
For an installation guide checkout the README.rst. We hope it works for you as well, as it does for us.