Open
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.
| 2. **Review the documentation** for the specific tool you need | ||
| 3. **Set up any required dependencies** (Python 3, jq, etc.) | ||
| 4. **Follow the workflow steps** outlined in each documentation file | ||
| 2. **Enable the pre-commit lint hook** (runs the same `ruff` checks as CI): |
| # Install with: git config core.hooksPath .githooks | ||
|
|
||
| set -euo pipefail | ||
|
|
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.
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