app-dell-storage/tox.ini
Reed, Joshua 14a8a97993 Follow up to Zuul Job Update for Metadata.
Upon investigation, not every app has the same
set of checks.  Some have flake8 but not pylint or
vise versa.  Therefore, some effort will be made
to attempt to create consitency accross apps while
also adding metadata.

Add flake8 check. Fix flake8 tox.ini and py file
issues.

This change set four checks; flake8, pylint, metadata,
and py39.

Test Plan
PASS - Zuul Jobs Pass as expected

Story: 2010929
Task: 49230

Change-Id: I6647bc80f8349bbbdc30c7d99760d16c50e2c41f
Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
2023-12-13 09:47:44 -07:00

55 lines
1.5 KiB
INI

[tox]
envlist = linters
minversion = 2.9
skipsdist = True
sitepackages=False
[testenv]
basepython = python3
install_command = pip install -U \
{opts} {packages} \
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt}
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
allowlist_externals =
bash
[testenv:flake8]
basepython = python3
description = Dummy environment to allow flake8 to be run in subdir tox
[testenv:pylint]
basepython = python3
description = Dummy environment to allow pylint to be run in subdir tox
[testenv:metadata]
basepython = python3
description = Dummy environment to allow sysinv-app to be run in subdir tox
[testenv:bandit]
basepython = python3
description = Dummy environment to allow bandit to be run in subdir tox
[testenv:bashate]
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
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 \
-e 'E*'"
[testenv:linters]
commands =
{[testenv:bashate]commands}