Add Tox and Coala setup for Python linter 91/110691/1
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Wed, 29 Jul 2020 13:33:27 +0000 (15:33 +0200)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Wed, 29 Jul 2020 13:33:27 +0000 (15:33 +0200)
Change-Id: Ic2e16c14f13c244f77c16fa5f38349f4549603a3
Issue-ID: INT-1666
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
.coafile [new file with mode: 0644]
tox.ini [new file with mode: 0644]

diff --git a/.coafile b/.coafile
new file mode 100644 (file)
index 0000000..3e55d45
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,11 @@
+[py]
+bears = PyLintBear
+pylint_disable = all
+pylint_enable =
+  bad-indentation, trailing-whitespace, unused-wildcard-import, unused-import,
+  unnecessary-semicolon, unnecessary-semicolon, undefined-variable,
+  syntax-error, unused-variable, using-constant-test,unused-argument,
+  len-as-condition, trailing-newlines, missing-final-newline, reimported,
+  too-many-function-args, singleton-comparison
+ignore =
+  .tox/**
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..8237e04
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,19 @@
+[tox]
+minversion = 3.2.0
+envlist = py
+skipsdist = true
+requires = pip >= 8
+
+[testenv]
+basepython = python3
+whitelist_externals =
+  git
+  bash
+deps =
+  coala-bears
+
+[testenv:py]
+commands_pre =
+    /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py"
+commands =
+    /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $(</tmp/.coalist_py) \ "