tox: Run 'pylint' against code
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/771/head
parent
78e5ce339f
commit
0cbbcce559
|
@ -29,7 +29,7 @@ static_python:
|
|||
before_script:
|
||||
- pip install "$GITLAB_CI_PYPI_TOX"
|
||||
script:
|
||||
- tox -e "py2-flake8,isort,yapf"
|
||||
- tox -e "py2-flake8,isort,yapf,py2-pylint"
|
||||
docs:
|
||||
stage: build
|
||||
image: ${GITLAB_CI_IMAGE_PYTHON3}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
[MASTER]
|
||||
ignore=_version.py,migrations
|
||||
load-plugins=pylint_django
|
||||
ignored-argument-names=args|kwargs
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=
|
||||
C0103,
|
||||
C0111,
|
||||
C0325,
|
||||
C0330,
|
||||
C0412,
|
||||
C1801,
|
||||
E1003,
|
||||
E1101,
|
||||
E1121,
|
||||
R0201,
|
||||
R0401,
|
||||
R0801, # needs to remain disabled see https://github.com/PyCQA/pylint/issues/214
|
||||
R0901,
|
||||
R0903,
|
||||
R0911,
|
||||
R0912,
|
||||
R0913,
|
||||
R0914,
|
||||
R0915,
|
||||
R1703,
|
||||
R1705,
|
||||
R1710,
|
||||
W0201,
|
||||
W0221,
|
||||
W0223,
|
||||
W0612,
|
||||
W0613,
|
||||
W0621,
|
||||
W0622,
|
||||
W0703,
|
||||
W1505,
|
||||
W5101,
|
|
@ -0,0 +1,39 @@
|
|||
[MASTER]
|
||||
ignore=_version.py,migrations
|
||||
load-plugins=pylint_django
|
||||
ignored-argument-names=args|kwargs
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=
|
||||
C0103,
|
||||
C0111,
|
||||
C0325,
|
||||
C0330,
|
||||
C0412,
|
||||
C1801,
|
||||
E1003,
|
||||
E1101,
|
||||
E1121,
|
||||
R0201,
|
||||
R0401,
|
||||
R0801, # needs to remain disabled see https://github.com/PyCQA/pylint/issues/214
|
||||
R0901,
|
||||
R0903,
|
||||
R0911,
|
||||
R0912,
|
||||
R0913,
|
||||
R0914,
|
||||
R0915,
|
||||
R1703,
|
||||
R1705,
|
||||
R1710,
|
||||
W0201,
|
||||
W0221,
|
||||
W0223,
|
||||
W0612,
|
||||
W0613,
|
||||
W0621,
|
||||
W0622,
|
||||
W0703,
|
||||
W1505,
|
||||
W5101,
|
24
tox.ini
24
tox.ini
|
@ -1,10 +1,14 @@
|
|||
[tox]
|
||||
envlist = py2-flake8,isort,yapf,{py2,py3}-build,py2-pytest,docs
|
||||
envlist = py2-flake8,isort,yapf,py2-pylint,{py2,py3}-build,py2-pytest,docs
|
||||
|
||||
[depversions]
|
||||
flake8 = 3.7.8
|
||||
isort = 4.3.18
|
||||
yapf = 0.28.0
|
||||
pylint = 1.9.5
|
||||
pylint3 = 2.3.1
|
||||
pylint_django = 0.11.1
|
||||
pylint_django3 = 2.0.11
|
||||
sphinx_rtd_theme = 0.4.3
|
||||
|
||||
[testenv:py2-flake8]
|
||||
|
@ -35,6 +39,24 @@ deps =
|
|||
skip_install = True
|
||||
commands = yapf -i -r .
|
||||
|
||||
[testenv:py2-pylint]
|
||||
deps =
|
||||
pylint=={[depversions]pylint}
|
||||
pylint-django=={[depversions]pylint_django}
|
||||
extras = dev
|
||||
commands = pylint \
|
||||
{envsitepackagesdir}/network \
|
||||
{envsitepackagesdir}/auth0login
|
||||
|
||||
[testenv:py3-pylint]
|
||||
deps =
|
||||
pylint=={[depversions]pylint3}
|
||||
pylint-django=={[depversions]pylint_django3}
|
||||
extras = dev
|
||||
commands = pylint --rcfile=.pylintrc3 \
|
||||
{envsitepackagesdir}/network \
|
||||
{envsitepackagesdir}/auth0login
|
||||
|
||||
[testenv:py2-build]
|
||||
skip_install = True
|
||||
commands =
|
||||
|
|
Loading…
Reference in New Issue