Makefile 1.01 KB
Newer Older
1
PY_SRC:=$(wildcard dmt/asn2dataModel.py dmt/aadl2glueC.py dmt/smp2asn.py dmt/*mappers/[a-zA-Z]*py dmt/commonPy/[a-zA-Z]*py)
2
PY_SRC:=$(filter-out dmt/B_mappers/antlr.main.py dmt/A_mappers/Stubs.py, ${PY_SRC})
3

4 5 6 7 8 9 10
# Python3.5 includes an older version of typing, which by default has priority over
# the one installed in $HOME/.local via setup.py.
#
# To address this, we find where our pip-installed typing lives:
TYPING_FOLDER:=$(shell pip3 show typing | grep ^Location | sed 's,^.*: ,,')
export PYTHONPATH=${TYPING_FOLDER}

11
all:	flake8 pylint mypy coverage
12 13

flake8:
14 15
	@echo Performing syntax checks via flake8...
	@flake8 ${PY_SRC} || exit 1
16 17

pylint:
18
	@echo Performing static analysis via pylint...
19
	@pylint --disable=I --rcfile=pylint.cfg ${PY_SRC}  | grep -v '^$$' | sed -n '/^Report/q;p'
20 21

mypy:
22
	@echo Performing type analysis via mypy...
23
	@mypy --disallow-untyped-defs --check-untyped-defs ${PY_SRC} || exit 1
24

25 26 27 28
coverage:
	@echo Performing coverage checks...
	@$(MAKE) -C tests-coverage  || exit 1

29
.PHONY:	flake8 pylint mypy coverage