繁体   English   中英

pylint 或 flake8 的声明性 Jenkins 管道语法

[英]Declarative Jenkins pipeline syntax for pylint or flake8

有人可以帮助我使用 Violation 插件的声明性语法或用于 pylint 的警告下一代插件吗

我正在使用以下语法。 但它没有生成任何图表

sh 'python3 -m pylint --fail-under=4.5 <module> <module> --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > pylint.log || echo "pylint exited with $?"'

echo "linting Success, Generating Report"

warningsParsers canComputeNew: false, canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'PyLint', pattern: '*']], unHealthy: ''

我使用以下语法来解决问题

sh 'python3 -m pylint --output-format=parseable --fail-under=<threshold value> module --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" | tee pylint.log || echo "pylint exited with $?"'
echo "linting Success, Generating Report"
recordIssues enabledForFailure: true, aggregatingResults: true, tool: pyLint(pattern: 'pylint.log')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM