How can I convert PHP Code Sniffer XML report into HTML?

萝らか妹 提交于 2019-11-30 23:56:44

Few days ago I posted XSLT stylesheet on my blog: http://phpdojo.blogspot.com/2010/12/converting-phpcodesniffer-xml-report.html including new type of report: xsl.

Just to add: If you run phpcs through Jenkins, then you can output the report in 'checkstyle' format.

phpcs --report=checkstyle --report-file=/phpcs/out.xml

Then configure your Jenkins job to parse the output using that file.

Here's the plugin:

https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin

Here's some output samples:

XSLT is quite cumbersome to write, very few people I know can do it well; you can instead parse the XML in a PHP script and spit out HTML.

CodeSniffer can also output its report as a CSV file - if that's easier for you to parse, use that instead.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!