[INTT-41] Add generic pre-commit hooks#21
Open
tlater-famedly wants to merge 8 commits into
Open
Conversation
4d4f23b to
1cd4e9a
Compare
tlater-famedly
commented
Jun 8, 2026
ddd23ae to
5002036
Compare
b5a1a75 to
a7c8220
Compare
5002036 to
ea07e97
Compare
a7c8220 to
09d1f18
Compare
3439a9b to
1e61a3a
Compare
1e61a3a to
b53f5c2
Compare
df44d9f to
367bbae
Compare
tlater-famedly
commented
Jun 11, 2026
2ed2aa3 to
3d23fc1
Compare
7d3ce0d to
541b197
Compare
98dc997 to
5e4322c
Compare
In theory these should be uncontroversial, as we are already using them company-wide, but various repositories might subtly deviate, so we should check this integrates first.
These are very performant and look nice-to-have for pretty much any project. The ones we shouldn't take on are explicitly listed and commented.
This results in slightly more ergonomic pre-commit hooks that still function without nix. The trade-off is that running `prek` not in a nix shell might still work if the user happens to already have some binaries installed, or we might miss the fact that some binaries aren't added to the wrapper.
5e4322c to
a73e464
Compare
This allows using these hooks in nehws for now, we can enable them when we figure out what's needed to not cause issues downstream.
2b0046a to
03ae9e0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This sets up general-purpose pre-commit hooks.
The PR adds two separate commits, the first adds all the hooks from famedly/backend-pre-commit-templates, which should in theory be pretty non-controversial, and then another commit which simply adds all hooks built-into
prek.For details about the built-in hooks, see the upstream docs, but they are all pretty straightforwardly named.