Skip to content

[INTT-41] Add generic pre-commit hooks#21

Open
tlater-famedly wants to merge 8 commits into
mainfrom
tlater/generic-pre-commit
Open

[INTT-41] Add generic pre-commit hooks#21
tlater-famedly wants to merge 8 commits into
mainfrom
tlater/generic-pre-commit

Conversation

@tlater-famedly

Copy link
Copy Markdown
Contributor

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.

@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch from 4d4f23b to 1cd4e9a Compare June 8, 2026 19:53
Comment thread nix/general/workflows/check-pre-commit-hooks.nix
Comment thread standards/allowed-github-actions.toml Outdated
Comment thread nix/general/workflows/check-pre-commit-hooks.nix
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch from ddd23ae to 5002036 Compare June 8, 2026 20:27
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch from 5002036 to ea07e97 Compare June 8, 2026 20:32
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch 2 times, most recently from 3439a9b to 1e61a3a Compare June 8, 2026 20:34
Comment thread nix/general/workflows/check-pre-commit-hooks.nix
Base automatically changed from tlater/skeleton to main June 9, 2026 08:52
@tlater-famedly tlater-famedly marked this pull request as draft June 9, 2026 08:53
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch from 1e61a3a to b53f5c2 Compare June 9, 2026 14:14
@tlater-famedly tlater-famedly changed the title Add generic pre-commit hooks [INTT-5] Add generic pre-commit hooks Jun 10, 2026
@tlater-famedly tlater-famedly changed the title [INTT-5] Add generic pre-commit hooks [INTT-41] Add generic pre-commit hooks Jun 10, 2026
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch 9 times, most recently from df44d9f to 367bbae Compare June 11, 2026 15:54
Comment thread nix/general/workflows/check-pre-commit-hooks.nix
@tlater-famedly tlater-famedly marked this pull request as ready for review June 11, 2026 15:57
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch 3 times, most recently from 2ed2aa3 to 3d23fc1 Compare June 11, 2026 16:21
Comment thread nix/general/workflows/check-pre-commit-hooks.nix Outdated
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch 4 times, most recently from 7d3ce0d to 541b197 Compare June 12, 2026 12:07
Comment thread README.md Outdated
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch 3 times, most recently from 98dc997 to 5e4322c Compare June 12, 2026 12:22
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.
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch from 5e4322c to a73e464 Compare June 12, 2026 13:04
Comment thread nix/modules/filegen.nix Outdated
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.
@tlater-famedly tlater-famedly force-pushed the tlater/generic-pre-commit branch 2 times, most recently from 2b0046a to 03ae9e0 Compare June 12, 2026 13:14
@tlater-famedly tlater-famedly changed the base branch from main to tlater/incremental June 12, 2026 13:23
@tlater-famedly tlater-famedly changed the base branch from tlater/incremental to main June 12, 2026 13:23
Comment thread nix/modules/filegen.nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant