2018-06-08 09:27:15 -05:00
|
|
|
[tox]
|
2018-06-08 20:09:47 -05:00
|
|
|
envlist = linters
|
2018-06-08 09:27:15 -05:00
|
|
|
minversion = 2.3
|
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
install_command = pip install -U {opts} {packages}
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
OS_STDOUT_CAPTURE=1
|
|
|
|
OS_STDERR_CAPTURE=1
|
|
|
|
OS_TEST_TIMEOUT=60
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
|
2018-06-08 20:09:47 -05:00
|
|
|
[testenv:linters]
|
2018-10-05 10:58:17 +00:00
|
|
|
basepython = python3
|
2018-06-08 20:09:47 -05:00
|
|
|
whitelist_externals = bash
|
2020-01-15 14:22:45 -05:00
|
|
|
# Bashate warnings
|
|
|
|
# E001 Trailing Whitespace
|
|
|
|
# E002 Tab indents
|
|
|
|
# E003 Indent not multiple of 4
|
|
|
|
# E006 Line too long
|
|
|
|
# E010 The "do" should be on same line as for
|
|
|
|
# E011 Then keyword is not on same line as if or elif keyword
|
|
|
|
# E020 Function declaration not in format ^function name {$
|
|
|
|
# E042 local declaration hides errors
|
2018-06-08 09:27:15 -05:00
|
|
|
commands =
|
2020-01-15 14:22:45 -05:00
|
|
|
bash -c "find {toxinidir}/build-tools \
|
2018-06-08 20:09:47 -05:00
|
|
|
-not \( -type d -name .?\* -prune \) \
|
|
|
|
-type f \
|
|
|
|
-not -name \*~ \
|
|
|
|
-not -name \*.md \
|
|
|
|
-name \*.sh \
|
2020-08-19 14:32:38 -04:00
|
|
|
-print0 | xargs --no-run-if-empty -0 bashate -v -e 'E*' -i E003,E006,E010"
|
2020-01-15 14:22:45 -05:00
|
|
|
bash -c "find {toxinidir}/build-tools \
|
|
|
|
-not \( -type d -name .?\* -prune \) \
|
|
|
|
-type f \
|
|
|
|
-not -name \*~ \
|
|
|
|
-not -name \*.md \
|
|
|
|
\( -exec bash -c 'file \{\} | grep -q shell' \; \
|
|
|
|
-a ! -name '*.sh' \) \
|
|
|
|
-print0 | xargs --no-run-if-empty -0 bashate -v -e 'E*' -i E001,E002,E003,E006,E010,E011,E020,E042"
|
2018-06-08 20:09:47 -05:00
|
|
|
bash -c "find {toxinidir} \
|
2020-01-15 14:22:45 -05:00
|
|
|
\( -name stx -prune \) \
|
2018-06-08 20:09:47 -05:00
|
|
|
-o \( -name .tox -prune \) \
|
|
|
|
-o -type f -name '*.yaml' \
|
|
|
|
-print0 | xargs -0 yamllint"
|
2018-06-08 09:27:15 -05:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2018-10-05 10:58:17 +00:00
|
|
|
basepython = python3
|
2018-06-08 09:27:15 -05:00
|
|
|
usedevelop = False
|
|
|
|
skip_install = True
|
|
|
|
deps =
|
|
|
|
pep8
|
|
|
|
commands =
|
|
|
|
pep8
|
|
|
|
|
|
|
|
[testenv:venv]
|
2018-10-05 10:58:17 +00:00
|
|
|
basepython = python3
|
2018-06-08 09:27:15 -05:00
|
|
|
commands = {posargs}
|