【发布时间】:2012-03-06 01:07:39
【问题描述】:
我一直在使用带有 jenkins 的 PHP_CodeSniffer,我的 build.xml 是为 phpcs 配置的,如下所示
<target name="phpcs">
<exec executable="phpcs">
<arg line="--report=checkstyle --report-file=${basedir}/build/logs/checkstyle.xml --standard=Zend ${source}"/>
</exec>
</target>
我想忽略以下警告
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
117 | WARNING | Line exceeds 80 characters; contains 85 characters
--------------------------------------------------------------------------------
如何忽略行长警告?
【问题讨论】:
-
嗨,dextervip。您是否使用 Jenkins 插件来发布您的 phpcs 结果?我想知道这是如何在 Jenkins 中设置的。干杯,ns
-
@nonshatter 我一直在使用 Violations puglin 来发布我的结果。它工作得很好,只需安装它并在您的项目中启用它链接到您的 xml 文件。
-
谢谢@dextervip 我会检查一下。我昨天刚刚使用“checkstyle”插件进行了设置。它提供了一些不错的报告和一些趋势图等。更多信息给那些感兴趣的人:stackoverflow.com/a/12197103/1016364
标签: php jenkins continuous-integration pear codesniffer