tip*_*ipu 5 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
Run Code Online (Sandbox Code Playgroud)
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
======
...
Run Code Online (Sandbox Code Playgroud)
(报告继续按类型,原始指标,外部依赖关系统计)
pylint的xml文件名模式是:
**/pylint.log
Run Code Online (Sandbox Code Playgroud)
源路径模式为:
**/
Run Code Online (Sandbox Code Playgroud)
即便在所有这些之后,并且pylint.log显示我有lint错误,图表什么都没有显示.
任何想法如何获得pylint和违规插件一起很好地工作?
tip*_*ipu 16
似乎正确的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
Run Code Online (Sandbox Code Playgroud)
注意添加--msg-template参数
| 归档时间: |
|
| 查看次数: |
2194 次 |
| 最近记录: |