Skip to content

chore: add git hooks for fmt/clippy and commit-msg linting - #5

Merged
Patrick-Ehimen merged 1 commit into
mainfrom
chore/git-hooks
Jul 10, 2026
Merged

Patrick-Ehimen merged 1 commit into
mainfrom
chore/git-hooks

Conversation

@Patrick-Ehimen

Copy link
Copy Markdown
Member

Summary

  • Add checked-in .githooks/ (pre-commit + commit-msg) wired via core.hooksPath, no external dependency (husky/lefthook)
  • pre-commit mirrors the fmt and clippy CI jobs so contributors catch failures before pushing
  • commit-msg enforces Conventional Commits, matching existing history style
  • README documents the one-line opt-in: git config core.hooksPath .githooks

Test plan

  • Ran .githooks/commit-msg against a non-conforming message — rejected
  • Ran .githooks/commit-msg against a conforming message — accepted
  • Committed this change with hooks enabled — cargo fmt --check and cargo clippy -D warnings ran and passed

Mirrors the fmt and clippy CI jobs locally via a checked-in .githooks
directory (core.hooksPath), so contributors catch failures before pushing.
@Patrick-Ehimen
Patrick-Ehimen merged commit 9548f20 into main Jul 10, 2026
5 checks passed
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.

1 participant