Skip to content

Feat/ci precommit hooks#1

Merged
marvelousufelix merged 2 commits intomainfrom
feat/ci-precommit-hooks
Mar 28, 2026
Merged

Feat/ci precommit hooks#1
marvelousufelix merged 2 commits intomainfrom
feat/ci-precommit-hooks

Conversation

@marvelousufelix
Copy link
Copy Markdown
Owner

@marvelousufelix marvelousufelix commented Mar 28, 2026

closes QuorumCredit#198

Body:
Category: Infrastructure - Developer Experience
Priority: Low
Estimated Time: 1 hour

Description:
Add pre-commit hooks to run cargo fmt and cargo clippy before every commit.

Tasks:

Add .pre-commit-config.yaml
Configure fmt and clippy hooks
Document setup in CONTRIBUTING.md

…mpile issues

- Add .github/workflows/ci.yml with 4 jobs: fmt check, clippy (-D warnings),
  cargo check (wasm32-unknown-unknown), and cargo test
- Add .pre-commit-config.yaml with cargo fmt and cargo clippy hooks
- Update CONTRIBUTING.md with CI pipeline table and pre-commit setup docs
- Fix governance.rs: replace loan.defaulted field with loan.status comparison
- Expose get_slash_vote on contract public API in lib.rs
- Fix all test files: replace .defaulted/.repaid bool fields with LoanStatus enum
- Rewrite slash_auth_test.rs to use vote_slash instead of removed slash fn
- Remove unused imports: Config, DataKey, ContractError across test files
- Remove dead struct fields: contract_id from Setup structs in 5 test files
- Remove dead code: get_slash_balance, token_client from helpers.rs
- Remove dead rate-limit vars (_now, _last) from vouch.rs
- Remove unused slash_balance variable from loan.rs repay function
- Fix slash_precision_small_stake_test.rs: escaped string literals and dead vars
- Fix security_fixes_test.rs: redundant assignment to total_inflow
@marvelousufelix marvelousufelix merged commit 549c9b8 into main Mar 28, 2026
2 of 4 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.

Issue 198 Add Pre-Commit Hooks for fmt and clippy

1 participant