stx-puppet/tox.ini
Al Bailey 590ae77b35 Fix puppet-lint errors
Running tox locally or through zuul would fail with
puppet-lint warnings.

This was introduced by puppet-lint 2.4.0 and still exists
in 2.4.1

2.3.6 works as expected, so now we are clamping
to that version.

Change-Id: I19a1d4df2b299e4dcb581df43874d8e1866b3962
Closes-Bug: 1847534
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-10-09 15:39:30 -05:00

55 lines
1.4 KiB
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 codes are being suppressed:
# E006 Line too long
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 \
-e 'E*'"
[testenv:linters]
# Note: centos developer env requires ruby-devel
# Ubuntu developer env requires ruby-dev
whitelist_externals =
gem
bash
setenv =
GEM_HOME = {envdir}
GEM_PATH = {envdir}
skip_tests = \
--no-autoloader_layout-check \
--no-documentation-check
commands =
gem install --no-document json puppet-lint:2.3.6
bash -c "find {toxinidir}/puppet-manifests {toxinidir}/modules \
-name \*.pp -print0 \
| xargs -0 puppet-lint --fail-on-warnings {[testenv:linters]skip_tests}"
{[testenv:bashate]commands}