Projet

Général

Profil

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

Lauréline Guérin, 25 mars 2022 09:04

Télécharger (2,04 ko)

Voir les différences:

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

 pylint.sh |  2 +-
 tox.ini   | 26 ++++++++++++++++++++++----
 2 files changed, 23 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
......
45 43
commands =
46 44
  ./get_wcs.sh
47 45
  py.test {posargs: {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
48
  coverage: ./pylint.sh passerelle/
49 46
  codestyle: pre-commit run --all-files --show-diff-on-failure
50 47

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

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