summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Grimberg <agrimberg@linuxfoundation.org>2017-05-03 14:49:44 -0400
committerAndrew Grimberg <agrimberg@linuxfoundation.org>2017-05-03 15:58:48 -0400
commitb2f7abc5e5a00db1658dd04d8ed96059dff70eb0 (patch)
treebdc8e15409c45b1b705eba47f88a7afd7a089c05
parentffab4f773e77204e96cd6c37cbeb1979ad41e302 (diff)
Add configuration in prep to enable coala and tox
* Configure the .gitignore in prepration for coala lint checking and tox driven tests * Add needed configuration files for driving tox based tests including coala lint validation checks Issue: CIMAN-2 Change-Id: I41746a251ca0ca95c681426a2f5cd3474de425e6 Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
-rw-r--r--.coafile33
-rw-r--r--.editorconfig25
-rw-r--r--.gitignore5
-rw-r--r--tox.ini21
-rw-r--r--yamllint.conf8
5 files changed, 92 insertions, 0 deletions
diff --git a/.coafile b/.coafile
new file mode 100644
index 000000000..3f6f8f4b6
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,33 @@
+[GitCommit]
+bears = GitCommitBear
+ignore_length_regex = Signed-off-by,
+ Also-by,
+ Co-authored-by,
+ http://,
+ https://
+
+[JSON]
+bears = JSONFormatBear
+files = **/*.json
+ignore = .*/**
+indent_size = 2
+
+[YAML]
+bears = YAMLLintBear
+files = jjb/**/*.yaml
+document_start = True
+yamllint_config = yamllint.conf
+
+[ShellCheck]
+bears = ShellCheckBear,SpaceConsistencyBear
+files = jenkins-scripts/**/*.sh,
+ jjb/**/*.sh,
+ scripts/**/*.sh
+ignore = jenkins-scripts/*-local-env.sh,
+ jjb/global-jjb/shell/*.sh,
+ jjb/include-docker-push.sh,
+ jjb/include-update-pom-versions.sh,
+ jjb/testsuite/testsuite-docker.sh,
+shell = bash
+indent_size = 4
+use_spaces = yeah
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..5eb4e678e
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,25 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = space
+
+[*.json]
+indent_size = 2
+
+[*.rst]
+indent_size = 4
+
+[*.markdown]
+indent_size = 4
+max_line_length = 80
+
+[*.sh]
+indent_size = 4
+max_line_length = 80
+
+[*.yaml]
+indent_size = 4
+
diff --git a/.gitignore b/.gitignore
index f4cd20b9b..e824ce3fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,8 @@ target/
# Eclipse
.project
/.pydevproject
+
+# Python
+.tox/
+__pycache__/
+*.pyc
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000000000..dbeedd8bd
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,21 @@
+[tox]
+minversion = 1.6
+envlist = coala,docs,pep8
+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
+
+# [testenv:docs]
+# deps = sphinx
+# commands = sphinx-build -b html -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+
+[testenv:pep8]
+deps = flake8
+commands = flake8 scripts/
diff --git a/yamllint.conf b/yamllint.conf
new file mode 100644
index 000000000..32d76ab6e
--- /dev/null
+++ b/yamllint.conf
@@ -0,0 +1,8 @@
+extends: default
+
+rules:
+ empty-lines:
+ max-end: 1
+ line-length:
+ max: 120
+