Talking about awesomeness, I saw while working in the codechecker integration that code-coverage had been added. So, temporally, I switched to dev-master and started playing with it.
It worked great out of the box, just generate the coverage report, upload it and done.
But I faced a problem that, while I assume it's not a real problem for the vast majority of plugins... i think it can affect some. Here it is:
the local_codechecker does contain some external "libraries" (/pear and /PHPCompatibility) and I excluded them by using the thirdpartylibs.xml definition. Perfect so far.
Then, there is the /moodle directory, where the standard (ruleset and own sniffs) are. Those sniffs are written following the phpcs own standard, not moodle one... so in my .travis.yml file I added:
IGNORE_PATHS=moodle/tests/fixtures,moodle/Sniffs
and done. Perfect!
But now, those ignore paths are somehow also used by phpunit/code coverage and it causes the moodle sniffs not to appear as covered, when surely are the most covered in the plugin.
Then, I tried a number of combinations, to see if I could define the ignore paths individually, moving it to before_install (from env) and exporting it, moving it to the script section. adding them to every line before calling to moodle-plugin-ci... and all my attempts ended without success, with the moodle/Sniffs directory being completely ignored.
I looked for examples out there but have failed to find any way to change those environment values. So this is just to know:
- if there is any way to specify different ignore_paths by moodle-plugin-ci invocation. Looking to source code i was not able to imagine why my exports were not working to be honest, maybe I'm missing something obvious.
- if not, ask for it. I'm sure there is a valid use case for that, not only in the codechecker, that I agree is a non-standard plugin, but potentially in others.
Ciao :-)