无法获取pylint输出以填充违规图 [英] unable to get pylint output to populate the violations graph

查看:105
本文介绍了无法获取pylint输出以填充违规图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的构建步骤:

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的结果:

result of 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
======
...

(报告将继续按类型,原始指标,外部依存关系进行统计)

(the report continues with statistics by type, raw metrics, external dependencies)

pylint的xml文件名模式是:

the xml filename pattern for pylint is:

**/pylint.log

源路径模式为:

**/

即使如此,并且pylint.log显示我有棉绒错误,该图也没有显示任何内容.

Even after all this, and with pylint.log showing I have lint errors, the graph shows nothing.

有什么想法可以使pylint和违规插件很好地协同工作吗?

any ideas how to get pylint and the violations plugin working nicely together?

推荐答案

似乎正确的pylint命令如下:

it seems the correct pylint command is the following:

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参数的添加

note the addition of the --msg-template param

这篇关于无法获取pylint输出以填充违规图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆