强制在github分支上合并pylint score

2024-05-16 15:17:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我想设置一个质量检查,在授权对某个github分支进行合并之前,强制执行pylint的某个分数。有办法吗?我在github上看到可以设置“合并前需要状态检查通过”,我猜一个状态检查可能是pylint上的某个分数。你知道吗

谢谢你的指导。你知道吗


Tags: github状态分支分数质量检查pylint指导强制执行
1条回答
网友
1楼 · 发布于 2024-05-16 15:17:42

现在有一个解决方案:使用新的 fail-under标志。你知道吗

"If the final score is more than the specified score, it's considered a success and pylint exits with exit code 0. Otherwise, it's considered a failure and pylint exits with its current exit code based on the messages issued."

https://github.com/PyCQA/pylint/commit/16017690196e77fcabdedf1cd8b8cbfb357a97d4

相关问题 更多 >