Projet

Général

Profil

0003-build-make-it-fail-in-case-of-pylint-warnings-62099.patch

Lauréline Guérin, 22 mars 2022 10:29

Télécharger (2,03 ko)

Voir les différences:

Subject: [PATCH 03/65] build: make it fail in case of pylint warnings (#62099)

 pylint.sh |  2 +-
 tox.ini   | 25 +++++++++++++++++++++----
 2 files changed, 22 insertions(+), 5 deletions(-)
pylint.sh
2 2
set -e -x
3 3
env
4 4

  
5
pylint -f parseable --rcfile pylint.rc "$@" | tee pylint.out || /bin/true
5
pylint -f parseable --rcfile pylint.rc "$@" | tee pylint.out; test $PIPESTATUS -eq 0
tox.ini
1 1
[tox]
2 2
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/{env:BRANCH_NAME:}
3
envlist = py3-django22-xmlschema14-codestyle-coverage,py3-django22-xmlschema10
3
envlist = py3-django22-xmlschema14-codestyle-coverage,py3-django22-xmlschema10,pylint
4 4

  
5 5
[testenv]
6 6
usedevelop = True
......
24 24
  mock<4
25 25
  httmock
26 26
  python-dateutil
27
  pylint
28
  pylint-django
29 27
  django-webtest<1.9.3
30 28
  lxml
31 29
  mohawk
......
44 42
commands =
45 43
  ./get_wcs.sh
46 44
  py.test {posargs: {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
47
  coverage: ./pylint.sh passerelle/
48 45
  codestyle: pre-commit run --all-files --show-diff-on-failure
49 46

  
50 47
[pytest]
......
56 53
   module:.*init.*authority.*code.*syntax is deprecated:DeprecationWarning:pyproj
57 54
# wcs root directory must be renamed to fix this one
58 55
   ignore:Not importing directory.*/wcs':ImportWarning
56

  
57
[testenv:pylint]
58
setenv =
59
  DJANGO_SETTINGS_MODULE=passerelle.settings
60
  PASSERELLE_SETTINGS_FILE=tests/settings.py
61
  BRANCH_NAME={env:BRANCH_NAME:}
62
  SETUPTOOLS_USE_DISTUTILS=stdlib
63
deps =
64
  pytest-django
65
  pytest!=6.0.0
66
  WebTest
67
  mock<4
68
  httmock
69
  pylint
70
  pylint-django
71
  django-webtest<1.9.3
72
  pytest-freezegun
73
  mohawk
74
commands =
75
  ./pylint.sh passerelle/ tests/
59
-