From 302789623fbd934610b9ca72cbc8e8136eeb6670 Mon Sep 17 00:00:00 2001 From: Cristina Pauna Date: Thu, 18 Apr 2019 15:14:30 +0300 Subject: [PATCH] Add code verification tools 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 --- .coafile | 40 ++++++++++++++++++++++++++++++++++++++++ tox.ini | 18 ++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .coafile create mode 100644 tox.ini diff --git a/.coafile b/.coafile new file mode 100644 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 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 -- 2.16.6