From: Thanh Ha Date: Fri, 7 Apr 2017 16:04:18 +0000 (-0700) Subject: Add coala linting for YAML and JSON X-Git-Tag: v0.1.0~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=b9a8a519e9f91956b27bc8b1d636dac0ea3cdc29;p=releng%2Fglobal-jjb.git Add coala linting for YAML and JSON Change-Id: Ic64a0b208b338b6eaaddd4229aa036f076639e34 Signed-off-by: Thanh Ha --- diff --git a/.coafile b/.coafile new file mode 100644 index 00000000..291c2003 --- /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 index 00000000..a8804405 --- /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 index 00000000..b821cb8c --- /dev/null +++ b/yamllint.conf @@ -0,0 +1,7 @@ +extends: default + +rules: + empty-lines: + max-end: 1 + line-length: + max: 120