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

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/htmlcov/
/test_failures.txt
/test_rerun.txt
/pylint/

8
.pylintrc Normal file
View File

@ -0,0 +1,8 @@
[MASTER]
load-plugins=pylint_django
[REPORTS]
files-output=yes

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"

View File

@ -2,3 +2,6 @@
coverage==4.0.1
django-coverage-plugin==1.0
django-juno-testrunner==0.3.1
pylint==1.4.4
pylint-django==0.6.1