Jenkins 无法获取pylint输出以填充冲突图
我的构建步骤:Jenkins 无法获取pylint输出以填充冲突图,jenkins,jenkins-plugins,Jenkins,Jenkins Plugins,我的构建步骤: cd $WORKSPACE export TERM="linux" . venv/bin/activate pylint --rcfile=pylint.cfg $(find handlers -maxdepth 1 -name "*.py" -print) > pylint.log || exit 0 pylint.log的结果: ************* Module handlers C: 1, 0: Missing module docstring (miss
cd $WORKSPACE
export TERM="linux"
. venv/bin/activate
pylint --rcfile=pylint.cfg $(find handlers -maxdepth 1 -name "*.py" -print) > pylint.log || exit 0
pylint.log的结果:
************* Module handlers
C: 1, 0: Missing module docstring (missing-docstring)
C: 8, 0: Missing function docstring (missing-docstring)
************* Module handlers.foo
C: 1, 0: Black listed name "foo" (blacklisted-name)
C: 1, 0: Missing module docstring (missing-docstring)
C: 1, 0: Missing function docstring (missing-docstring)
E: 2,11: Undefined variable 'a' (undefined-variable)
E: 2,13: Undefined variable 'b' (undefined-variable)
Report
======
...
(报告继续提供按类型、原始指标、外部依赖项列出的统计信息)
pylint的xml文件名模式为:
**/pylint.log
源路径模式为:
**/
即使在所有这些之后,并且pylint.log显示我有lint错误,图形也没有显示任何内容
如何让pylint和violations插件协同工作?正确的pylint命令如下:
pylint --rcfile=pylint.cfg $(find handlers -maxdepth 1 -name "*.py" -print) --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > pylint.log || exit 0
注意,添加了--msg模板参数,我自己也遇到了这个问题。我想这是我安装违规插件方式的结果。重新启动Jenkins后,它起了作用:
$ sudo service jenkins restart
你用这个省了很多时间!