Closed amirtds closed 2 years ago
Why not just run tox
? That will run flake8, unit tests, bandit, or anything else we enable.
I tried to find a way to run tox on pre-commit but I couldn't find anything useful. I added bandit, black and Isort. If there is no way to add tox to pre-commit let's merge this.
I tried to find a way to run tox on pre-commit but I couldn't find anything useful. I added bandit, black and Isort. If there is no way to add tox to pre-commit let's merge this.
I just put:
#!/bin/sh
tox .
into .git/hooks/pre-commit
and that's always worked for me. I'm not really sure what the point is of the fancy pre-commit
tool.
I created this PR to run flake8 before we commit changes in the repo. It frequently happened to me that I made changes in the repo and pushed to the remote, and it doesn't pass our CI pipeline and I have to spend some time to fix the issues and commit again. To make this work we need to run
pip install pre-commit
and every time someone commits something flake8 run and checks the files. I think we can includeisort
andbandit
too