Add coala linting for YAML and JSON 33/4233/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 7 Apr 2017 16:04:18 +0000 (09:04 -0700)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 16 Apr 2017 03:40:03 +0000 (23:40 -0400)
Change-Id: Ic64a0b208b338b6eaaddd4229aa036f076639e34
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.coafile [new file with mode: 0644]
tox.ini [new file with mode: 0644]
yamllint.conf [new file with mode: 0644]

diff --git a/.coafile b/.coafile
new file mode 100644 (file)
index 0000000..291c200
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,23 @@
+[Default]
+ignore = .*/**
+
+[GitCommit]
+bears = GitCommitBear
+ignore_length_regex = Signed-off-by,
+    Also-by,
+    Co-authored-by,
+    http://,
+    https://
+
+[YAML]
+bears = YAMLLintBear
+files = **/*.yaml
+document_start = True
+yamllint_config = yamllint.conf
+
+[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..a880440
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,13 @@
+[tox]
+minversion = 1.6
+envlist = coala
+skipsdist = true
+
+[testenv:coala]
+basepython = python3
+deps =
+    coala
+    coala-bears
+commands =
+    python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
+    coala --non-interactive
diff --git a/yamllint.conf b/yamllint.conf
new file mode 100644 (file)
index 0000000..b821cb8
--- /dev/null
@@ -0,0 +1,7 @@
+extends: default
+
+rules:
+  empty-lines:
+    max-end: 1
+  line-length:
+    max: 120