Skip to content

chore: add .githooks pre-commit lint check#33

Merged
iamvirul merged 1 commit intomainfrom
chore/add-githooks
Feb 27, 2026
Merged

chore: add .githooks pre-commit lint check#33
iamvirul merged 1 commit intomainfrom
chore/add-githooks

Conversation

@iamvirul
Copy link
Member

Pull Request

Type of Change

  • 🔧 Chore (build process, CI/CD, dependency updates)
  • 📖 Documentation update

Description

Adds a .githooks/pre-commit script that runs ruff against staged Python files before every commit. This gives contributors immediate lint feedback locally rather than waiting for CI.

The hook is opt-in — contributors activate it once per clone with:

git config core.hooksPath .githooks

Related Issues / PRs

Closes #32

Changes Made

  • .githooks/pre-commit — pre-commit script that lints staged .py files with ruff; uses uv run ruff if uv is available, falls back to plain ruff
  • CONTRIBUTING.md — added hook setup instructions; corrected clone URL to VecGrep/VecGrep; added --extra dev to uv sync

Testing

  • Manual testing — staged a file with a lint violation, confirmed commit was blocked with the correct message
  • Staged a clean file, confirmed commit was allowed through

Checklist

  • My code follows the project's style guidelines (ruff passes)
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Adds a pre-commit hook that runs ruff against staged Python files.
Contributors activate it once with: git config core.hooksPath .githooks

Updates CONTRIBUTING.md with setup instructions and corrects the
clone URL to the new VecGrep org.

Closes #32
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@iamvirul iamvirul merged commit 5edf0bd into main Feb 27, 2026
2 checks passed
@iamvirul iamvirul self-assigned this Feb 27, 2026
@iamvirul iamvirul mentioned this pull request Feb 28, 2026
4 tasks
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.

chore: add .githooks pre-commit lint check for contributors

1 participant