diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e419f7b..4097632 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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} diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..f4da944 --- /dev/null +++ b/.pylintrc @@ -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, diff --git a/.pylintrc3 b/.pylintrc3 new file mode 100644 index 0000000..ccc5f89 --- /dev/null +++ b/.pylintrc3 @@ -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, \ No newline at end of file diff --git a/tox.ini b/tox.ini index d44deca..d2d5e0c 100644 --- a/tox.ini +++ b/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 =