I'd like to see some way to prevent running specific tests when using pre-commit run. My use case is that I want to use the no-commit-to-branch hook locally for commits (e.g. to block direct commits to "master"), but I don't want this particular test to run on my CI system (since the no-commit-to-branch test fails if running CI checks after merging a PR into these branches). I know I can run each pre-commit hook individually in my CI system (as I'm currently doing) or use an alternate configuration file, but the --exclude option seems like a cleaner approach.
Perhaps something like this can be used: pre-commit run --all-files --exclude="no-commit-to-branch,flake8"
You're looking for either SKIP= Or stages: [manual] depending on which direction you want
Thanks @asottile, just what I needed :)
Awesome! Thanks for the issue 馃帀 -- sorry if I was brief, I tapped that out on my phone :)
Most helpful comment
You're looking for either
SKIP=Orstages: [manual]depending on which direction you want