[COMMON] Add some python linters in tox.ini 43/117943/3
authorGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 17 Feb 2021 11:09:47 +0000 (12:09 +0100)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 23 Feb 2021 09:03:57 +0000 (09:03 +0000)
and configure them with a few reasonable parameters

Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Ic1e8d6be63c45d89de41e8589aa3bd1214a3f0a1

tox.ini

diff --git a/tox.ini b/tox.ini
index 7c7060f..fb6aca0 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -43,3 +43,14 @@ deps =
 commands =
   gitlint
 
+[testenv:autopep8]
+deps = autopep8
+commands =
+    autopep8 --max-line-length 120 --in-place --recursive kubernetes/ TOSCA/ docs/
+
+[testenv:pylint]
+deps = pylint
+whitelist_externals = find
+commands =
+    find kubernetes/ TOSCA/ docs/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring --method-rgx="(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$" --variable-rgx="[a-zA-Z_][a-zA-Z0-9_]{1,30}$" --reports=y --score=y  --output-format=colorized  \{\} +
+