chore(ci): add cargo fmt and clippy pre-commit hooks for backend/#186
Merged
ayomideadeniran merged 1 commit intoSoroLabs:mainfrom Mar 30, 2026
Merged
Conversation
- Add doublify/pre-commit-rust hooks for cargo fmt (--check) and clippy (-D warnings) targeting backend/indexer and backend/oracle separately - Hooks run on commit and manual stages - Existing local quality-gate script retained for test coverage
|
@AnnabelJoe Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thanks for the PR! This is currently under review and I will get back to you shortly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #156
Adds explicit
cargo fmtandcargo clippypre-commit hooks viadoublify/pre-commit-rustfor both Rust crates underbackend/.Changes to
.pre-commit-config.yamlNew repo block added using
https://github.com/doublify/pre-commit-rust(v1.0):fmtbackend/indexer--check)fmtbackend/oracle--check)clippybackend/indexer-D warnings)clippybackend/oracle-D warnings)All four hooks run on
commitandmanualstages.The existing
localquality-gate script (scripts/pre-commit-hook.sh) is retained — it additionally runscargo test --libwhich the new hooks do not cover.Install / Update Hooks Locally
After pulling this branch, run:
bash
Install pre-commit if not already present
pip install pre-commit
Install/update the hook environments (downloads doublify/pre-commit-rust)
pre-commit install
pre-commit install --hook-type pre-commit
Run all hooks manually against the full repo to verify
pre-commit run --all-files
To run only the Rust hooks manually:
bash
pre-commit run fmt --all-files
pre-commit run clippy --all-files