PyLint:如果代码评级不高于某个定义的阈值评级,如何使PyLint失败

2024-05-23 20:07:22 发布

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

我在buildbot的构建步骤中使用了Pylint,我希望如果某些代码质量达不到要求,构建应该停止

BitBucketFactory.addStep(steps.PyLint(command=['pylint', '--py3k', '--ignore=ln2sql',
                                                '--disable=C,import-error,import-error,too-few-public-methods,undefined-variable',
                                                'swagger_server'],
                                    haltOnFailure=True)) 

Tags: 代码import质量步骤errorstepscommandpylint