
This job adds a single linters tox target. The linters target is an aggregation of linters for this repo including: - bashate Other linters such as yamllint can be added to this repo by later commits. Certain bashate codes are suppressed. They can be enabled by later commits. This commit also adds basic contributing and hacking docs. Change-Id: Id4426c1b25f223e5010aee3a4977c557d06ad77f Story: 2006166 Task: 36541 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
40 lines
1013 B
INI
40 lines
1013 B
INI
[tox]
|
|
envlist = linters
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
sitepackages=False
|
|
|
|
[testenv]
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_DEBUG=1
|
|
OS_LOG_CAPTURE=1
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
|
|
[testenv:bashate]
|
|
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
|
|
# The following bashate codes are suppressed
|
|
# E006 Line too long
|
|
# E042 local declaration hides errors
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
-name \*.sh \
|
|
-print0 | xargs -r -n 1 -0 bashate -v \
|
|
-i E006,E042 \
|
|
-e 'E*'"
|
|
|
|
[testenv:linters]
|
|
commands =
|
|
{[testenv:bashate]commands}
|