Make errors when using external commands

28 Views Asked by At

I have a Makefile in my python project. I am getting issues when trying to build the target lint which is configured as:

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

When I run the make to build the target lint, I end up with the following error message,


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

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

Line: 79 corresponds to the pylint line in the Makefile.

I am able to sucessfully run, all the individual commands by itself i.e. 'pylint', 'mypy' & 'flake8' commands for the lint target.

Can you point to how can i debug to understand whats happening when trying to execute the commands from make ?

I can't get rid of this as its part of github actions on my repo.

1

There are 1 best solutions below

0
Pierre.Sassoulas On

As explained by MadScientist in the comment, pylint exited with error code 12, it means you have warning message (4) and refactor messages (8) raised. You have to fix your python code, not the makefile, nor the github actions, to make pylint happy.