Skip to content

chore: add cargo fmt/clippy/test git hooks (.githooks/)#407

Merged
BryanFRD merged 1 commit intomainfrom
chore/git-hooks
May 3, 2026
Merged

chore: add cargo fmt/clippy/test git hooks (.githooks/)#407
BryanFRD merged 1 commit intomainfrom
chore/git-hooks

Conversation

@BryanFRD
Copy link
Copy Markdown
Contributor

@BryanFRD BryanFRD commented May 3, 2026

Summary

  • .githooks/pre-commit runs cargo fmt --check + cargo clippy -D warnings on commits that touch Rust files.
  • .githooks/pre-push runs cargo test --workspace --all-features.
  • .githooks/install.sh sets core.hooksPath = .githooks for one-shot setup.
  • CONTRIBUTING updated with a one-liner setup instruction.
  • .gitattributes enforces LF line endings on the hook scripts so they execute on Windows checkouts too.

Why .githooks/ instead of husky: husky needs a Node toolchain in the repo. FerrFlow is pure Rust + a slim npm wrapper, so the canonical Rust pattern (core.hooksPath) keeps the repo Node-free.

Test plan

  • ./.githooks/install.sh set core.hooksPath correctly.
  • Pre-commit fired on this commit (no Rust files staged, hook short-circuited as designed).
  • Pre-push fired and ran cargo test --workspace --all-features clean (586 passed, 0 failed).

Copilot AI review requested due to automatic review settings May 3, 2026 09:05
@BryanFRD BryanFRD merged commit ea4b1f9 into main May 3, 2026
13 checks passed
@BryanFRD BryanFRD deleted the chore/git-hooks branch May 3, 2026 09:05
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Details
Benchmark suite Current: e1da6cd Previous: 0b5fe57 Ratio
changelog/build_50 8061 ns/iter (± 356) 7955 ns/iter (± 147) 1.01
changelog/build_500 73258 ns/iter (± 3203) 68596 ns/iter (± 1303) 1.07

This comment was automatically generated by workflow using github-action-benchmark.

@BryanFRD BryanFRD review requested due to automatic review settings May 3, 2026 09:30
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