-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: add git-hook hook for pre-commit #384
Comments
I think There may be some intention or concern to not do so because the comments mention that it is slightly dangerous: Lines 16 to 29 in f118fca
A manual run adds a kind of self-check to confirm the existence of unused-in-file imports. I see this visual check as a good thing in library imports like |
Since a run of pre-commit is required before creating a PR, it would be reasonable to add pre-commit as git-hook. We use this in our development repos and have very good experience since it ensures everyone is actually running pre-commit.
At the moment, it looks like only part of the repo is actually conveying the code standards enforced by the pre-commit tasks, as can be verified by running
pre-commit run --all-files
. Running pre-commit in the CI might help-as well.If you think that sounds reasonable, I'd be happy to create a PR.
The text was updated successfully, but these errors were encountered: