I've got an instance of phpUnderControl <http://phpundercontrol.org/> up
and running at
http://ci.tesla.usability.wikimedia.org/
In any case, it runs several code-analysis tools on the MediaWiki core,
produces the documentation, using PHPDocumentor, and then runs the unit
tests (including the parser tests, but not, at this point, the Selenium
tests).
If any of the tools produces warnings or errors, they're stored in the
log and can be accessed via the web UI.
After a run, the server waits 5 minutes, checks the SVN repo to see if
any modifications have been made, and, if so, runs the process again.
The UI has the following tabs:
* Tests
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw?tab=t…
A list of the tests performed and whether or not they passed. The
parser tests don't (yet) have their titles here, but they are run.
* Metrics
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw?tab=m…
Various charts showing when tests were passing or not, the level of
code coverage, etc.
* Coverage
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw?tab=c…
This shows what sort of coverage the tests are providing. You can
drill down to the individual line, etc.
* Documentation
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw?tab=d…
The output of PHPDocumentor. (
http://www.phpdoc.org/)
* CodeSniffer
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw?tab=p…
CodeSniffer does style checks on the code. Since we don't have a
plugin describing our coding style for CodeSniffer written yet, it
is using the PEAR coding guidelines.
Note that it can analyze CSS and JS as well as PHP.
* PHPMD
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw?tab=p…
PHP Mess Detector (
http://phpmd.org/) does for PHP what PMD
(
http://pmd.sf.net) does for Java. It takes a given PHP source code
base and look for several potential problems within that
source. These problems can be things like:
* Possible bugs
* Suboptimal code
* Overcomplicated expressions
* Unused parameters, methods, properties
* PHP CPD
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw?tab=c…
PHP Copy Paste Detector. The goal of phpcpd is not to replace more
sophisticated tools such as phpcs, pdepend, or phpmd, but rather to
provide an alternative to them when you just need to get a quick
overview of duplicated code in a project.
(Descriptions copied from the respective software's websites.)
Right now, because of the memory requirements of some of the tools, I've
restricted them to the includes/api directory. I've run the whole suite
of tools against the code on my own laptop — the memory simply isn't
available on the server.
So, this is a first start. Give it a look and let me know what you
think.
Mark.
--
http://hexmode.com/
Embrace Ignorance. Just don't get too attached.