使用外部命令时出错

问题描述 投票:0回答:1

我的 python 项目中有一个 Makefile。我在尝试构建目标 lint 时遇到问题,其配置为:

lint:
    pylint -j0 --ignore=src/_playground --extension-pkg-whitelist=gurobipy src/
    mypy --exclude src/_playground/ src/
    flake8 --exclude=src/_playground src/

当我运行 make 来构建目标 lint 时,我最终得到以下错误消息,


------------------------------------------------------------------
Your code has been rated at 9.94/10 (previous run: 9.94/10, +0.00)

make: *** [Makefile:79: lint] Error 12

行:79 对应于 Makefile 中的

pylint
行。

我能够成功运行所有单独的命令,即 lint 目标的“pylint”、“mypy”和“flake8”命令。

您能否指出我如何调试以了解尝试执行来自

make
的命令时发生的情况?

我无法摆脱它,因为它是我的仓库中 github 操作的一部分。

makefile build gnu-make pylint
1个回答
0
投票

正如 MadScientist 在评论中所解释的,pylint 退出时出现 错误代码 12,这意味着您收到了警告消息 (4) 和重构消息 (8) 。你必须修复你的代码才能让 pylint 满意。

© www.soinside.com 2019 - 2024. All rights reserved.