Skip to content

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

Merged
BigLep merged 2 commits into
masterfrom
add-pre-commit-lint-hook
May 8, 2026
Merged

chore: add pre-commit lint hook matching CI#39
BigLep merged 2 commits into
masterfrom
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 Outdated
Comment thread .githooks/pre-commit
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>
@BigLep BigLep requested a review from rjan90 May 8, 2026 15:07
@BigLep
Copy link
Copy Markdown
Contributor Author

BigLep commented May 8, 2026

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

@BigLep BigLep merged commit 9279732 into master May 8, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to 🎉 Done in FOC May 8, 2026
@rjan90
Copy link
Copy Markdown
Contributor

rjan90 commented May 8, 2026

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.

No worries, I will take a quick look at it.

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

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants