无法获得 pylint 输出来填充违规图
unable to get pylint output to populate the violations graph
我的构建步骤:
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-template 参数
我自己也遇到过这个问题。我认为这是我安装 Violations 插件的方式的结果。重启 Jenkins 后有效:
$ sudo service jenkins restart
我的构建步骤:
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-template 参数
我自己也遇到过这个问题。我认为这是我安装 Violations 插件的方式的结果。重启 Jenkins 后有效:
$ sudo service jenkins restart