Hey,

Replying to DanielKs comment on the "Improvements to the implementation of Entity" thread, which has nothing to do with the topic of said thread, hence a new one.

I got asked what "high risk" in my last email means.

These results are using the CRAP metric [0] to determine the CRAPiness of
the code (which is indicated by the number in brackets). You can have
PHPUnit generate this by running the following command in the root
directory of WikibaseDataModel and clicking "dashboard" on the generated
index.html page: phpunit --coverage-html /some/path

[0] http://googletesting.blogspot.de/2011/02/this-code-is-crap.html

I suggest to have this generated regularly and put it online somewhere (maybe on wikidata-docs.wikimedia.de).

I suggested doing so many times in the past, though it turned out that maintaining such own infrastructure is to much work for our team. Our initial go at it is still online, even though it has been broken for over half a year:

http://wikidata-docs.wikimedia.de/testcoverage/
http://wikidata-docs.wikimedia.de/testcoverage/phpcoverage/20130320/extensions_Diff.dashboard.html

If we can get such a thing up and running again, and not have it break every week, that'd be awesome. Going with a service we do not need to maintain ourselves does seem to be the more sustainable approach though. Coveralls.io [0] support is already a big step in that direction, though this service unfortunately does not provide these CRAP reports at this time.

There are several other interesting metrics we could track, some of which make good candidates for CI rules (ie commits with new methods with a complexity above n get a -1). There are some people (of course I forgot who) currently looking at PHPCS [1] integration into WMF Jenkins, which is a promising development.

[0] https://coveralls.io/r/wikimedia
[1] http://pear.php.net/package/PHP_CodeSniffer

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil. ~=[,,_,,]:3
--