The 'exclude' field in pre-commit hook is a regex, not a glob,
as it is advertised by pre-commit runtime warnings.
"tests/*" matches "tests", "tests/" or "tests//...///" but also any file
or folder, not necessarily at the root of the project, that contains
"tests" in its name.
The right regex to ignore the tests folder at project root is "^test/"
Signed-off-by: Guillaume Lambert <[email protected]>
Change-Id: I12d8c7e2205085ef1fb2fdf267d059112729d705
hooks:
- id: bandit
# Bandit does not need to run on test code
- exclude: tests/*
+ exclude: ^tests/
- repo: https://github.com/pycqa/pydocstyle
rev: 5.0.2