Add pylint running capability
This commit is contained in:
parent
77a5bf35de
commit
6312d48c00
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
/htmlcov/
|
||||
/test_failures.txt
|
||||
/test_rerun.txt
|
||||
/pylint/
|
||||
|
8
.pylintrc
Normal file
8
.pylintrc
Normal file
@ -0,0 +1,8 @@
|
||||
[MASTER]
|
||||
|
||||
load-plugins=pylint_django
|
||||
|
||||
[REPORTS]
|
||||
|
||||
files-output=yes
|
||||
|
14
Makefile
14
Makefile
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user