run pylint inside tox
This commit is contained in:
parent
37173fb80e
commit
5461298c66
|
@ -6,8 +6,4 @@ rm -f coverage.xml
|
|||
rm -f test_results.xml
|
||||
|
||||
pip install --upgrade tox
|
||||
pip install --upgrade pylint pylint-django
|
||||
tox -r
|
||||
test -f pylint.out && cp pylint.out pylint.out.prev
|
||||
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc passerelle/ | tee pylint.out) || /bin/true
|
||||
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e -x
|
||||
env
|
||||
if [ -f /var/lib/jenkins/pylint.django.rc ]; then
|
||||
PYLINT_RC=/var/lib/jenkins/pylint.django.rc
|
||||
elif [ -f pylint.django.rc ]; then
|
||||
PYLINT_RC=pylint.django.rc
|
||||
else
|
||||
echo No pylint RC found
|
||||
exit 0
|
||||
fi
|
||||
|
||||
test -f pylint.out && cp pylint.out pylint.out.prev
|
||||
pylint -f parseable --rcfile ${PYLINT_RC} "$@" | tee pylint.out || /bin/true
|
||||
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true¶
|
7
tox.ini
7
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = coverage-{django17,django18}
|
||||
envlist = coverage-django17-pylint,coverage-django18
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/
|
||||
|
||||
[testenv]
|
||||
|
@ -19,9 +19,10 @@ deps =
|
|||
WebTest
|
||||
mock
|
||||
httmock
|
||||
pylint==1.4.0
|
||||
astroid==1.3.2
|
||||
python-dateutil
|
||||
pylint
|
||||
pylint-django
|
||||
commands =
|
||||
./getmagic.sh
|
||||
py.test {env:COVERAGE:} {posargs:tests/}
|
||||
pylint: ./pylint.sh passerelle/
|
||||
|
|
Loading…
Reference in New Issue