-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Description
Add a pre-commit hook configuration using pre-commit framework so contributors automatically have their code formatted and linted before every commit — preventing CI failures from simple formatting issues.
Requirements
- Add
.pre-commit-config.yamlto repo root - Hook 1: run
cargo fmt --checkand auto-fix - Hook 2: run
cargo clippy -- -D warnings - Hook 3: run
cargo test(optional, skip-able with--no-verify) - Add setup instructions to CONTRIBUTING.md
Suggested Execution
- Branch:
git checkout -b dx/pre-commit-hooks - Create
.pre-commit-config.yaml - Configure rust-specific hooks
- Test hooks locally
- Add installation instructions to CONTRIBUTING.md
- Commit:
dx: add pre-commit hooks for fmt and clippy
Acceptance Criteria
-
.pre-commit-config.yamlcreated and working -
cargo fmthook runs on commit -
cargo clippyhook runs on commit - Installation instructions in CONTRIBUTING.md
- Hooks tested on a real commit
Reactions are currently unavailable