Run pylint on addons providing a buld breaker on travis (#2011)

* Run pylint (using a pylintrc file) on the addon Python scripts. It serves as a build breaker for severe issues.
* Skip y2038 addon for now until it's fixed.
This commit is contained in:
amai2012 2019-07-18 20:51:58 +02:00 committed by GitHub
parent abea580b78
commit 453de18101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,7 @@ before_install:
- travis_retry sudo apt-get update -qq
- travis_retry sudo apt-get install -qq python-pygments qt5-default qt5-qmake qtbase5-dev qtcreator libxml2-utils libpcre3 gdb unzip wx-common xmlstarlet
- travis_retry sudo python2 -m pip install --upgrade pytest==4.6.4
- travis_retry python2 -m pip install --user pylint
matrix:
# do notify immediately about it when a job of a build fails.
@ -84,6 +85,11 @@ matrix:
# check python syntax by compiling all addon scripts
- python -m compileall ./addons
- python3 -m compileall ./addons
# run pylint
- cd addons
# - pylint *.py y2038/*.py ! First resolve https://trac.cppcheck.net/ticket/9210 "y2038 addon no longer working"
- pylint *.py
- cd ..
# check python syntax by compiling some selected scripts
- python -m py_compile ./tools/donate-cpu.py
- python3 -m py_compile ./tools/donate-cpu.py

5
addons/pylintrc Normal file
View File

@ -0,0 +1,5 @@
# Just the severe stuff...
[MESSAGES CONTROL]
disable=C,R,W
[REPORTS]
reports=no