Introduce 'pylint' for static code analysis (fixes #289)
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/387/head
parent
d4fb5189d1
commit
3872105dac
|
@ -21,14 +21,14 @@ static:
|
|||
before_script:
|
||||
- pip install tox~=3.8.0
|
||||
script:
|
||||
- tox -e "py2-flake8,isort,yapf"
|
||||
- tox -e "py2-flake8,isort,yapf,py2-pylint"
|
||||
static3:
|
||||
stage: static
|
||||
image: python:3
|
||||
before_script:
|
||||
- pip install tox~=3.8.0
|
||||
script:
|
||||
- tox -e "py3-flake8"
|
||||
- tox -e "py3-flake8,py3-pylint"
|
||||
docs:
|
||||
stage: build
|
||||
image: python:2
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
[MASTER]
|
||||
ignore=_version.py,migrations
|
||||
load-plugins=pylint_django
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=
|
||||
C0103,
|
||||
C0111,
|
||||
C0122,
|
||||
C0411,
|
||||
C0412,
|
||||
C0325,
|
||||
C1801,
|
||||
E1101,
|
||||
E0213,
|
||||
R0101,
|
||||
R0201,
|
||||
R0401,
|
||||
R0801,
|
||||
R0901,
|
||||
R0903,
|
||||
R0914,
|
||||
R0915,
|
||||
R1705,
|
||||
W0105,
|
||||
W0107,
|
||||
W0110,
|
||||
W0150,
|
||||
W0201,
|
||||
W0221,
|
||||
W0223,
|
||||
W0511,
|
||||
W0612,
|
||||
W0613,
|
||||
W0621,
|
||||
W0703,
|
||||
W1201,
|
||||
W1202,
|
||||
W5102,
|
||||
W5103,
|
||||
W5104,
|
20
tox.ini
20
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = {py2,py3}-flake8,isort,yapf,{py2,py3}-build,py2-pytest
|
||||
envlist = {py2,py3}-flake8,isort,yapf,{py2,py3}-{pylint,build},py2-pytest
|
||||
|
||||
[testenv:py2-flake8]
|
||||
deps =
|
||||
|
@ -45,6 +45,24 @@ skip_install = True
|
|||
commands =
|
||||
python setup.py sdist bdist_wheel
|
||||
|
||||
[testenv:py2-pylint]
|
||||
deps =
|
||||
pylint==1.9.4
|
||||
pylint-django==0.11.1
|
||||
extras = dev
|
||||
commands = pylint \
|
||||
{envsitepackagesdir}/db \
|
||||
{envsitepackagesdir}/auth0login
|
||||
|
||||
[testenv:py3-pylint]
|
||||
deps =
|
||||
pylint==2.3.1
|
||||
pylint-django==2.0.9
|
||||
extras = dev
|
||||
commands = pylint \
|
||||
{envsitepackagesdir}/db \
|
||||
{envsitepackagesdir}/auth0login
|
||||
|
||||
[testenv:deps]
|
||||
install_command = python -m pip install --no-deps {opts} {packages}
|
||||
recreate = True
|
||||
|
|
Loading…
Reference in New Issue