Feature request: In-house pre-commit hook integration #1095
MatthewScholefield
started this conversation in
Ideas
Replies: 2 comments
-
+1 to this. Rye looks very promising, but using pre-commit allows developers to easily include a wide variety of hooks, and also ensure that every commit automatically passes qa checks without any manual intervention. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ruff has pre-commit integration, which is what |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since
rye
offersrye lint --fix
andrye fmt
out of the box, it's natural that people may want to run this as a pre-commit hook. There already existspre-commit
which has its own dependency management system which seems redundant in the context ofrye
(but for reference, here's the mini config I use for it). So I'm wondering if there is the potential to offer some simple in-house solution for this.Right now it actually would work fine to just make some
.hooks/pre-commit
file which specifiesrye lint --fix && rye fmt
but this won't handle re-adding changed files and also won't have any nice simple UI to show which hooks are running, passed, etc.Some potential implementations:
rye pre-commit install
andrye pre-commit check
. Thecheck
command would read frompyproject.toml
to determine the list of checks / scripts to run.rye-pre-commit
command (repo name something like Rye integrated pre-commit hooks)Overall, I'm not sure this is something others would want but I just wanted to bring it up and see what others think.
Beta Was this translation helpful? Give feedback.
All reactions