Enable pylint

- enable pylint execution with current violations temporary disabled
- avoid installing dependencies for linting (heavy)
- pin linters to avoid suprises

Change-Id: Ica47efcec7a4da3b0bf949612cf9f1a49016c488
This commit is contained in:
Sorin Sbarnea 2020-09-08 11:23:03 +01:00 committed by Sorin Sbarnea (zbr)
parent 97ca1c24c3
commit 01a290f2c0
3 changed files with 56 additions and 3 deletions

50
.pylintrc Normal file
View File

@ -0,0 +1,50 @@
[MASTER]
jobs = 0
[MESSAGES CONTROL]
disable =
# TODO(ssbarnea): remove temporary skips adding during initial adoption:
broad-except,
dangerous-default-value,
duplicate-code,
fixme,
function-redefined,
global-statement,
import-error,
import-outside-toplevel,
inconsistent-return-statements,
invalid-name,
line-too-long,
literal-comparison,
logging-not-lazy,
missing-class-docstring,
missing-function-docstring,
missing-module-docstring,
no-else-break,
no-else-raise,
no-else-return,
no-member,
no-self-use,
protected-access,
redefined-outer-name,
simplifiable-if-expression,
super-init-not-called,
super-with-arguments,
too-few-public-methods,
too-many-arguments,
too-many-branches,
too-many-instance-attributes,
too-many-locals,
too-many-statements,
undefined-loop-variable,
ungrouped-imports,
unidiomatic-typecheck,
unused-argument,
unused-variable,
useless-else-on-loop,
useless-object-inheritance,
wrong-import-order,
[REPORTS]
output-format=colorized

View File

@ -1,4 +1,3 @@
hacking>=3.1.0,<3.2.0; python_version>='3.5'
coverage>=3.6
fixtures>=3.0.0
python-subunit

View File

@ -49,5 +49,9 @@ commands = bindep test
[testenv:linters]
basepython = python3
commands = flake8
deps =
flake8==3.8.3
pylint==2.6.0
commands =
flake8
pylint elastic_recheck