Skip to content

ci: Add pre-commit hooks for Rust formatting and Clippy lints on contract changes #1729

Description

@Gbangbolaoluwagbemiga

Description

The frontend uses Husky for pre-commit hooks (frontend/.husky/) but the Rust contracts have no pre-commit enforcement. Add hooks that run cargo fmt --check and cargo clippy on staged .rs files.

Acceptance Criteria

  • Pre-commit hook script added
  • cargo fmt --check runs on staged Rust files
  • cargo clippy -- -D warnings runs on staged Rust files
  • Hook skippable with --no-verify for emergencies

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions