iniscan
iniscan copied to clipboard
JUnit XML output format for CI integration
Hi,
CI systems like Jenkins can publish JUnit XML results out of the box. It would be great if we could have a exporter for that format.
For a JUnit XML format specification see here: https://github.com/windyroad/JUnit-Schema.
Example how php-cs-fixer exports to JUnit format: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/src/Report/JunitReporter.php
I started working on it here and it basically does its job already. https://github.com/derFunk/iniscan/blob/junit-xml-output-format/src/Psecio/Iniscan/Command/ScanCommand/Output/Junit.php
The only reason why I don't want to create a PR yet already is that there seem to be some unresolved issues regarding PHP 7: https://github.com/psecio/iniscan/issues/101, which should be resolved, otherwise JUnit will break the build because of false positives. ( @enygma ? ).
Hi @derFunk, I've left a comment in #101 about trying to reproduce the issue. I'm having problems on my side doing it so it makes it harder to fix. This looks great and I'd love to get it in if you're comfortable making a PR for it to review.