我有以下 tox.ini 文件来运行 pylint。它抓取所有 python 文件,然后对它们进行 lint。[testenv:pylint]deps = -rrequirements.txtbasepython=python2commands = - sh -c 'find . -iname "*.py" | grep -v .tox | xargs pylint -sn --output-format=colorized --rcfile={toxinidir}/.pylintrc'仅在命令行上运行 shell 部分具有正确的退出代码。然而,当使用 tox 运行时,它会吞下退出代码并且总是成功。在使用该sh -c选项时,tox 是否有正确的退出代码?
1 回答
叮当猫咪
TA贡献1776条经验 获得超12个赞
以单个破折号字符开头的命令意味着忽略退出代码。[1]
commands =
sh -c 'find . -iname "*.py" | grep -v .tox | xargs pylint -sn --output-format=colorized --rcfile={toxinidir}/.pylintrc'
添加回答
举报
0/150
提交
取消