This post originated from an RSS feed registered with PHP Buzz
by Sebastian Bergmann.
Original Post: PHPUnit as a Project Mess Detector
Feed Title: Sebastian Bergmann on PHP
Feed URL: http://sebastian-bergmann.de/rss.php?category=6&version=2.0
Feed Description: Sebastian Bergmann is a long-time contributor to various PHP projects, including PHP itself. He is currently working for eZ Systems AS on the Workflow Engine component for the eZ Platform. As the developer of PHPUnit, he also helps with testing the eZ Components. In his free time he likes to hack on Open Source software and to take photographs, preferably while travelling the world.
PMD , also known as Project Mess Detector , is a popular tool in the Java world that scans Java source code and looks for potential problems. It is well integrated with other tools such as Eclipse or CruiseControl , making the collected information available at multiple points throughout the development process.
Why am I blogging about this? Well. As of version 3.2, PHPUnit will not only be able to calculate and collect a variety of software metrics . It will also be able to report violations of rules that are based on these metrics in PMD's XML format. This information can then be fed to any tool that integrates with PMD.
For starters I implemented the code size rules that take, among other information, the Lines of Executable Code (ELOC) , Cyclomatic Complexity , and NPath Complexity metrics into account.