Add pylint running capability

This commit is contained in:
Gergely Polonkai
2015-10-20 11:28:27 +02:00
parent 77a5bf35de
commit 6312d48c00
4 changed files with 25 additions and 1 deletions

View File

@@ -1,8 +1,20 @@
APPENDCOV = $(shell test -s test_rerun.txt && echo "-a")
MODULES = duckbook booking api accounts
test:
coverage run $(APPENDCOV) \
--source "duckbook,booking,api,accounts" \
--source `echo $(MODULES) | sed 's/ /,/g'` \
manage.py test `cat test_rerun.txt`
coverage html
coverage report
@echo "Coverage data is available in HTML format under the htmlcov directory"
lint:
rm -rf pylint
pylint --rcfile=.pylintrc $(MODULES) || true
mkdir pylint
sh -c 'for file in pylint_*; do \
o="$${file#pylint_}"; \
mv "$$file" pylint/$$o; \
done'
@echo "lint data is available in TXT format under the pylint directory"