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 <guillaume.lambert@orange.com>
Change-Id: I74e22bff98c78a7d0dbabac81fdda7b07ed50d4f
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