Development Guide
Mess Detector
Mess Detector
The "phpmd" target generates an xml-file that holds data about code passages that are considered risky, e.g. things that could be a bug, like assignments in conditions.
1 | public function faultyAssignmentInCondition($some_bool) |
The first method shows a "beginners classic" and a warning will help to find a bug early.
The second method however shows a very common use of assignments in a condition. Since these exist, the existence of such a construction cannot be considered a bug, but it should be warned about it.
This roughly describes the category of information contained in the report.
Here's how to set them report up.
Prerequisite is, that your build includes the "phpmd" target, which writes a file build/logs/pmd.xml
You'll then receive a report looking like this, which you can browse through:
12 Apr 2014 MB: The build contains a configuration on the checks that are made in this build step. Currently, the only thing checked is the Cyclomatic Complexity. The ruleset to be checked is subject to further development since the build would otherwise warn on irrelevant things for the ILIAS project.