Skip to content

chore(dev): replace pre-commit with prek - #784

Merged
mjq merged 1 commit into
mainfrom
refactor/replace-pre-commit-with-prek
Nov 23, 2026
Merged

mjq merged 1 commit into
mainfrom
refactor/replace-pre-commit-with-prek

Conversation

@joshuarli

Copy link
Copy Markdown
Member

Replaces pre-commit with prek as the dev hook runner.

pre-commit was the only reason virtualenv was in uv.lock; removing it drops virtualenv and its transitive dependencies from the lock instead of patching them. The pre-commit-hooks block moves to prek's builtin hooks, git hooks install with prek install --prepare-hooks -f, and CI runs prek prepare-hooks / prek run --all-files with the prek cache path.

Verified: uv lock --check, prek validate-config .pre-commit-config.yaml, and the migrated hooks via prek run --all-files <builtin hooks> — all pass. A full local run still fails on the pre-existing goimports system hook, which is absent locally but installed in CI.

Refs DI-2950.

pre-commit pulls virtualenv and its command-injection advisories into the dev lock. prek is pre-commit-compatible and manages hook environments with uv, so virtualenv and its transitive dependencies drop out entirely.
@joshuarli
joshuarli requested a review from a team as a code owner November 23, 2026 18:03
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

DI-2950

@mjq
mjq merged commit 333759b into main Nov 23, 2026
23 checks passed
@mjq
mjq deleted the refactor/replace-pre-commit-with-prek branch November 23, 2026 21:43
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.

2 participants