-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add default pre-commit hooks #401
Add default pre-commit hooks #401
Conversation
9edc7f6
to
7bb2c65
Compare
Closure size of λ du -sh $(nix-build -A python3Packages.pre-commit-hooks)
860K /nix/store/g07vbn53mvqy5gaqa3dmw4w0lcr2i89a-python3.11-pre-commit-hooks-4.5.0 |
2523017
to
3e3c144
Compare
I have now listed all added default pre-commit hooks to the corresponding sections of the README. Since I noticed a couple of formatting issues in the README, I fixed them in 9593b40, so that it is now standard Markdown as checked by Since the various hooks includes hooks other than formatters, I renamed the section's headline from @domenkozar Should we add |
Oh thanks for all this work! We'll have to base it on top of #397 otherwise we'll get into conflicts. |
Sure, I'll try to rebase onto that. |
9593b40
to
b9fadf8
Compare
@domenkozar Alright, my changes are now on top of #397. |
cc @sandydoo |
b9fadf8
to
e9b5ead
Compare
Great work, @totoroot! RE #196, there are two main blockers I'd like to solve before merging:
If you have any ideas/thoughts on these, I'd love to hear them! |
|
Hey! We merged it, could you rebase on top of master now? |
e9b5ead
to
87719d2
Compare
87719d2
to
b9fadf8
Compare
b9fadf8
to
317fc48
Compare
This makes the `enabledPackages` attribute work again.
Fix `nix flake check`s
Yesterday I messed up the large rebase a little, so many thanks to @9999years who fixed up the branch 💐 @domenkozar Ready for review/merge now! |
|
@9999years Surely a good idea, but that should be done in a separate PR, as this one did not change the |
Wait, the CI failures are non-blocking -- CI hasn't passed on the |
Opened #421 to fix the CI failures on macOS. |
Could you rebase on master? |
I merged master into this branch. |
This PR adds almost all non-deprecated hooks from the original pre-commit-hooks repository.
Two of these hooks were asked for in #31 by @PierreR and workarounds have been proposed, like writing custom hooks, or using the
rawConfig
option.Thanks to @kalbasit,
pre-commit-hooks
got packaged for nixpkgs, so why not add all these default pre-commit hooks that are listed here?I've tested them all, set some sane defaults and occasionally renamed them slightly or changed the description, so it is clearer, what the individual hooks are used for. The rest of the settings were taken from the hooks configuration in the original repository.
All the hooks seem to pass the initial checks and can be used just fine. I haven't added all the arguments for all hooks, but tried to add all that are necessary for sensible usage as a pre-commit hook.
In case someone tries to use one of these hooks and cannot find a needed option that is available in the original hook, please open an issue and feel free to assign me to it. I'll try to add it then.
I have yet to add all hooks to the README. Keeping this as a draft until I get around to it, which should be at the beginning of next week. Feel free to review the proposed changes in the meantime.