What would be the best way to use pants as pre-com...
# general
r
What would be the best way to use pants as pre-commit hooks for linting and formatting? Just write a custom bash script to call pants ?
w
There may be other ways, but if you need an example of using pre-commit hooks with pants, you can look at the main repo: https://github.com/pantsbuild/pants/tree/main/build-support/githooks https://www.pantsbuild.org/docs/contributor-setup#step-2-set-up-git-hooks You can, naturally, trim this down to your specific use case - since there is a lot of Pants/Rust-specific stuff in here, but I use that folder of the repo as inspiration for my githooks
👍 2