chore: add pre-push hook enforcing fmt, clippy, and tests
Adds .githooks/pre-push that runs cargo fmt --check, cargo clippy -- -D warnings, and cargo test before every push. Enable with: git config core.hooksPath .githooks Skip with git push --no-verify for rapid iteration. Documented in README.md and CONTRIBUTING.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ac540d2b63
commit
3162653695
3 changed files with 59 additions and 2 deletions
14
README.md
14
README.md
|
|
@ -219,6 +219,20 @@ cargo fmt # Format
|
|||
cargo test --test memory_comparison -- --nocapture
|
||||
```
|
||||
|
||||
### Pre-push hook
|
||||
|
||||
A git hook runs `cargo fmt --check`, `cargo clippy -- -D warnings`, and `cargo test` before every push. Enable it once:
|
||||
|
||||
```bash
|
||||
git config core.hooksPath .githooks
|
||||
```
|
||||
|
||||
To skip the hook when you need a quick push during development:
|
||||
|
||||
```bash
|
||||
git push --no-verify
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT — see [LICENSE](LICENSE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue