Add code verification tools 66/566/4
authorCristina Pauna <cristina.pauna@enea.com>
Thu, 18 Apr 2019 12:14:30 +0000 (15:14 +0300)
committerCristina Pauna <cristina.pauna@enea.com>
Mon, 22 Apr 2019 07:37:39 +0000 (10:37 +0300)
JIRA: VAL-10

Tools used to verify code style and correctness.
Usage command: tox coala

This patch needs to be merged before https://gerrit.akraino.org/r/#/c/568/

Change-Id: I9d4d05b13f037f814832eff279c0e410e6a34b08
Signed-off-by: Cristina Pauna <cristina.pauna@enea.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..e7f59d0
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,40 @@
+[all]
+ignore = .tox/**,
+    .git/**,
+    .gitignore,
+    .gitreview,
+    .gitmodules,
+    **.sw?,
+    **.orig
+
+[all.GitCommit]
+bears = GitCommitBear
+ignore_length_regex = Signed-off-by,
+    Also-by,
+    Co-authored-by,
+    http://,
+    https://
+
+[all.reStructuredText]
+bears = SpaceConsistencyBear,WriteGoodLintBear
+files = docs/**.rst
+use_spaces = true
+ignore = .git/**,
+    .tox/**,
+
+[all.ShellCheck]
+bears = ShellCheckBear,SpaceConsistencyBear
+files = **.sh
+shell = bash
+use_spaces = true
+
+[all.YAML]
+bears = YAMLLintBear
+files = **.yaml, **.yml
+use_spaces = true
+max_line_length = 120
+
+[all.Python]
+bears = PyLintBear
+files = **.py
+use_spaces = true
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..f53943c
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+minversion = 1.6
+envlist =
+   coala,
+skipsdist = true
+passenv = TOX_WORK_DIR
+toxworkdir = {env:TOX_WORK_DIR:/tmp/v}
+
+[testenv:coala]
+basepython = python3
+deps =
+   coala
+   coala-bears
+   nodeenv
+commands =
+   nodeenv -p
+   npm install --global write-good
+   coala --non-interactive