Would you know where is my syntax / code error in my following Makefile please ?
.PHONY: lint
PYTHON_SCRIPTS_LIST := $(shell find . -type f -name "*.py")
PYTHON ?= python
lint:
$(PYTHON) -m pylint --rcfile=.pylintrc $(PYTHON_SCRIPTS_LIST)
When I execute make lint
, it works well but returns :
Makefile:7: recipe for target 'lint' failed
make: *** [lint] Error 30
Thank you in advance for your help.
After clarifying in comments, it seems that you're running pylint and it still emits message. pylint will exit with error code 0 only if there isn't any message emitted. So you can either:
|| true
after the command ( $(PYTHON) -m pylint --rcfile=.pylintrc $(PYTHON_SCRIPTS_LIST) || true
)exit-zero
option ( $(PYTHON) -m pylint --rcfile=.pylintrc $(PYTHON_SCRIPTS_LIST) --exit-zero
)