Add Coala linting 99/5799/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 9 Aug 2017 17:29:39 +0000 (10:29 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 9 Aug 2017 17:29:39 +0000 (10:29 -0700)
Change-Id: Id378925dcebe48c23465401240df0f647f8ae1ad
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
.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..09216c3
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,30 @@
+[all]
+ignore = .tox/**,
+    .git/**,
+    .gitignore,
+    .gitreview,
+    .gitmodules,
+    node_modules/**,
+    **.sw?,
+    **.orig
+
+[all.GitCommit]
+bears = GitCommitBear
+ignore_length_regex = Signed-off-by,
+    Also-by,
+    Co-authored-by,
+    http://,
+    https://
+
+[all.MarkDown]
+bears = MarkdownBear,SpaceConsistencyBear,WriteGoodLintBear
+files = **.md, **.markdown
+use_spaces = true
+
+[all.ShellCheck]
+bears = ShellCheckBear,SpaceConsistencyBear
+files = **.sh
+shell = bash
+indent_size = 4
+use_spaces = yeah
+
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..2ac4645
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+minversion = 1.6
+envlist = coala
+skipsdist = true
+
+[testenv:coala]
+basepython = python3
+deps =
+    coala
+    coala-bears
+    # Markdown lint requires nodejs
+    nodeenv
+commands =
+    nodeenv -p
+    npm install --global remark-cli remark-lint write-good
+    python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
+    coala --non-interactive
+