summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2020-07-21 13:29:40 +0200
committerHervé Beraud <hberaud@redhat.com>2020-09-22 12:25:01 +0200
commit5e1011a630b3ae4ac90ff771fc1e05b79038fc4c (patch)
tree023c4fafe1ee56b7d5e38a59af080986c4c8ac2e /tox.ini
parentf97f99a0c4329f25c8054b665f826a764ba8791c (diff)
downloadoslo-config-5e1011a630b3ae4ac90ff771fc1e05b79038fc4c.tar.gz
Adding pre-commit
Introduced changes: - pre-commit config and rules - Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks. - Applying fixes for pre-commit compliance in all code. Also commit hash will be used instead of version tags in pre-commit to prevend arbitrary code from running in developer's machines. pre-commit will be used to: - trailing whitespace; - Replaces or checks mixed line ending (mixed-line-ending); - Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker); - Checks that non-binary executables have a proper shebang (check-executables-have-shebangs); - Check for files that contain merge conflict strings (check-merge-conflict); - Check for debugger imports and py37+ breakpoint() calls in python source (debug-statements); - Attempts to load all yaml files to verify syntax (check-yaml); - Run flake8 checks (flake8) (local) For further details about tests please refer to: https://github.com/pre-commit/pre-commit-hooks Change-Id: I65a40bbff17d92b959764846801d5e0ddd3b97ce Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini2
1 files changed, 1 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index 92466fc..e4f7a05 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,7 +31,7 @@ deps =
[testenv:pep8]
commands =
- flake8
+ pre-commit run -a
# TODO(stephenfin): Add mypy here once it's passing
{[testenv:bandit]commands}