From b9a8a519e9f91956b27bc8b1d636dac0ea3cdc29 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Fri, 7 Apr 2017 09:04:18 -0700 Subject: [PATCH] Add coala linting for YAML and JSON Change-Id: Ic64a0b208b338b6eaaddd4229aa036f076639e34 Signed-off-by: Thanh Ha --- .coafile | 23 +++++++++++++++++++++++ tox.ini | 13 +++++++++++++ yamllint.conf | 7 +++++++ 3 files changed, 43 insertions(+) create mode 100644 .coafile create mode 100644 tox.ini create mode 100644 yamllint.conf 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 -- 2.16.6