Exclude local downloaded collections from bashate and bandit

Skip ansible/collections in bashate and bandit runs.

These files come from downloaded Ansible Galaxy collections rather than
tracked repo content, and can cause pep8 failures due to upstream
issues.

Change-Id: If0fe3c6153131bcdea5ee888a61843df62b8b94c
Signed-off-by: Grzegorz Koper <grzegorzk@stackhpc.com>
This commit is contained in:
Grzegorz Koper committed 2026-05-08 12:17:18 +00:00
1 parent 1486c00bdb
commit b4ee0137ed
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -7,5 +7,6 @@ ROOT=$(readlink -fn $(dirname $0)/.. )
# https://bugs.launchpad.net/bash8/+bug/1895102
find $ROOT -not -wholename \*.tox/\* -and -not -wholename \*.test/\* \
-and -not -wholename \*.ansible/\* -and -not -wholename \*venv\* \
-and -not -wholename \*/ansible/collections/\* \
-and -not -wholename \*/ansible/roles/\*.\*/\* \
-and -name \*.sh -print0 | xargs -0 bashate -v --ignore E006,E010
+1 -1
View File
@@ -38,7 +38,7 @@ commands =
# directives.
python3 {toxinidir}/tools/sphinx8 README.rst CONTRIBUTING.rst doc/source --ignore D001
yamllint etc/kayobe
bandit -r --severity-level=high ansible kayobe tools
bandit -r --severity-level=high -x ansible/collections ansible kayobe tools
[testenv:venv]
deps =