Hey Antoine!
Am 13.05.19 um 20:59 schrieb Antoine Musso:
Hello,
A few months ago, the code health group enquired about the Php metrics static
analysis tool [1] and it has been rather straightforward to run it automatically
and publish its report:
https://doc.wikimedia.org/mediawiki-core/master/phpmetrics/
The report has a list of potential coupling and also show relation between
objects. That might be a complement.
Yea, that's what I used for my initial analysis for the session on decoupling at
TechConf in Portland :)
phpmetrics and similar tools are useful, but they do not analyze the transitive
dependencies (at least not sufficiently, for my use case). That is, they can't
tell me whether two classes are coupled, but they can't tell me which classes to
decouple to resolve clusters of tightly coupled code. And they can't measure how
"tangled" the codebase is overall, just how "good" or "bad"
a given class is (or
all classes are, on average).
As for your tool, I am pretty sure we can easily run
it automatically and
publish it next to the PHP Metrics report? The addition to CI has been rather
straightforward:
A container:
https://gerrit.wikimedia.org/r/#/c/integration/config/+/469689/
The Jenkins job:
https://gerrit.wikimedia.org/r/#/c/integration/config/+/469690/
Ruprecht comes with a few dependencies that may make containerization less
straight forward. Not terribly hard, but somewhat annoying. E.g. it needs python
1 *and* 3, it needs graph-tool which has to be installed as a debian package
from a non-standard repo, etc.
If you feel like looking into that, I'd of course be happy, of course ;)
--
Daniel Kinzler
Principal Software Engineer, Core Platform
Wikimedia Foundation