Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I7e2d918ced690624df44ef8a84df865aa8505b40
--- /dev/null
+---
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.4.0
+ hooks:
+ - id: trailing-whitespace
+ exclude: '.patch$'
+ # trailing blanks shall not preferably be fixed in patch files
+
+ - repo: https://github.com/Lucas-C/pre-commit-hooks
+ rev: v1.4.2
+ hooks:
+ - id: remove-tabs
+ stages: [commit]
+ exclude: '^(.git/|docs/make.bat|docs/Makefile|)'
+
bashate # Apache-2.0
bandit
sphinxcontrib-spelling
bashate # Apache-2.0
bandit
sphinxcontrib-spelling
-envlist = docs,pep8,pylint,yamllint,bashate,bandit,py310,cover,perm
+envlist = docs,pep8,pylint,yamllint,bashate,bandit,py310,cover,perm,pre-commit
[testenv]
pip_version = pip==20.2.4
[testenv]
pip_version = pip==20.2.4
-exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
sh -c "\
find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"
-exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
sh -c "\
find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"
+
+[testenv:pre-commit]
+basepython = python3.10
+commands =
+ pre-commit run --all-files --show-diff-on-failure
sphinxcontrib-spelling===4.3.0
ansible-lint===5.2.1
setuptools_scm===6.3.2
sphinxcontrib-spelling===4.3.0
ansible-lint===5.2.1
setuptools_scm===6.3.2