summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Lambert <guillaume.lambert@orange.com>2021-02-17 12:09:47 +0100
committerGuillaume Lambert <guillaume.lambert@orange.com>2021-03-03 07:32:45 +0000
commitfbb7f16ad6808cd2d188a2e5c0c2724c4dca17bc (patch)
treee02e02b9746c0d1e7712f32cb43d006e6dc735a0
parenta66d3320832bf8d3cdb320465a404d7292c33c8b (diff)
[COMMON] Add some python linters in tox.ini
and configure them with a few reasonable parameters Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ic1e8d6be63c45d89de41e8589aa3bd1214a3f0a1 (cherry picked from commit 056b2d4e36cefe108a764ad710996f8dfab2740f)
-rw-r--r--tox.ini11
1 files changed, 11 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index c685a3fdd2..4b82a29061 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,3 +31,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 \{\} +
+