Skip to content

chore: add pre-commit lint hook matching CI#39

Open
BigLep wants to merge 1 commit intomasterfrom
add-pre-commit-lint-hook
Open

chore: add pre-commit lint hook matching CI#39
BigLep wants to merge 1 commit intomasterfrom
add-pre-commit-lint-hook

Conversation

@BigLep
Copy link
Copy Markdown
Contributor

@BigLep BigLep commented May 6, 2026

Summary

  • Add .githooks/pre-commit that runs uvx ruff check . and uvx ruff format --check . — the same checks as the CI lint job
  • Zero dependencies beyond uvx (already required for development)
  • Opt-in with one command: git config core.hooksPath .githooks

Test plan

  • Hook runs automatically on commit and catches lint/format issues
  • Verified hook passes on clean codebase
  • Documented setup in README Getting Started section

🤖 Generated with Claude Code

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>
@FilOzzy FilOzzy added this to FOC May 6, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC May 6, 2026
@BigLep BigLep requested a review from Copilot May 6, 2026 19:08
@BigLep BigLep self-assigned this May 6, 2026
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC May 6, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-commit to run uvx ruff check . and uvx ruff format --check . on commit.
  • Update README.md Getting Started steps to document enabling the hook via git 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.

Comment thread README.md
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):
Comment thread .githooks/pre-commit
# Install with: git config core.hooksPath .githooks

set -euo pipefail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants