koder aka kdanilov | 39e449e | 2016-12-17 15:15:26 +0200 | [diff] [blame] | 1 | .PHONY: mypy pylint pylint_e |
koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 2 | |
| 3 | |
| 4 | ALL_FILES=$(shell find wally/ -type f -name '*.py') |
| 5 | STUBS="stubs:.env/lib/python3.5/site-packages" |
koder aka kdanilov | 39e449e | 2016-12-17 15:15:26 +0200 | [diff] [blame] | 6 | ACTIVATE=cd ~/workspace/wally; source .env/bin/activate |
koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 7 | |
| 8 | mypy: |
koder aka kdanilov | 39e449e | 2016-12-17 15:15:26 +0200 | [diff] [blame] | 9 | bash -c "${ACTIVATE}; MYPYPATH=${STUBS} python3 -m mypy -s ${ALL_FILES}" |
| 10 | |
| 11 | |
| 12 | PYLINT_FMT=--msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} |
| 13 | |
| 14 | pylint: |
| 15 | bash -c "${ACTIVATE} ; python3 -m pylint '${PYLINT_FMT}' --rcfile=pylint.rc ${ALL_FILES}" |
| 16 | |
| 17 | pylint_e: |
| 18 | bash -c "${ACTIVATE} ; python3 -m pylint -E '${PYLINT_FMT}' --rcfile=pylint.rc ${ALL_FILES}" |