I have two git
pre-commit hooks enabled in pre-commit-config.yml
:
- A code formatting hook that takes very little time
- Our pytest hook, which takes much more time
When (1) updates code formatting, it fails, but (2) still runs. Then (1) and (2) must be run again, doubling the time it takes to run the commit. I'd rather run (1) and run (2) only if (1) passes. Is that possible using pre-commit
, and if so, how would I do it? I've plumbed the depths fo the documentation but so far I've been unable to find anything useful.