chore: add pre-commit lint hook matching CI#39
Conversation
Add .githooks/pre-commit that runs ruff check and ruff format --check, matching the CI lint job exactly. Developers opt in with: git config core.hooksPath .githooks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds an opt-in Git pre-commit hook under .githooks/ that runs the same Ruff lint/format checks as the CI lint job, and documents enabling it in the repo root README.
Changes:
- Add
.githooks/pre-committo runuvx ruff check .anduvx ruff format --check .on commit. - Update
README.mdGetting Started steps to document enabling the hook viagit config core.hooksPath .githooks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Documents enabling the repo-local pre-commit hook in Getting Started. |
| .githooks/pre-commit | New pre-commit hook that runs Ruff lint + formatting checks via uvx. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add an explicit `command -v uvx` guard in the pre-commit hook with actionable install instructions, and note the uv/uvx prerequisite in the README Getting Started section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I forgot to request review from you @rjan90 on this. I'm going to get this in because I think ow controversy (opt in) and easy to change. I am clearing out some of the PRs before restructuring the code a bit. I'm happy to incorporate any feedback after |
No worries, I will take a quick look at it. |
Summary
.githooks/pre-committhat runsuvx ruff check .anduvx ruff format --check .— the same checks as the CI lint jobuvx(already required for development)git config core.hooksPath .githooksTest plan
🤖 Generated with Claude Code