Join the discussion on Telegram
Why this matters
The contracts CI job (.github/workflows/ci.yml) builds the WASM and runs cargo test, but there is no formatting or lint gate for the Rust code — no cargo fmt --check and no cargo clippy. The repo has no rustfmt.toml. This means style drift and common Rust foot-guns (needless clones, unwraps, etc.) land unflagged, and contributors get no fast local signal. Adding these two checks is cheap and catches a whole class of review nits automatically.
Acceptance criteria
Files to touch
.github/workflows/ci.yml
contracts/ (formatting fixes as needed)
Out of scope
- JS/TS lint changes (frontend already runs
npm run lint).
Join the discussion on Telegram
Why this matters
The contracts CI job (
.github/workflows/ci.yml) builds the WASM and runscargo test, but there is no formatting or lint gate for the Rust code — nocargo fmt --checkand nocargo clippy. The repo has norustfmt.toml. This means style drift and common Rust foot-guns (needless clones, unwraps, etc.) land unflagged, and contributors get no fast local signal. Adding these two checks is cheap and catches a whole class of review nits automatically.Acceptance criteria
cargo fmt --all -- --checkstep to thecontractsjob in.github/workflows/ci.yml(fails the build on unformatted code).cargo clippy --all-targets --target wasm32-unknown-unknown -- -D warningsstep (or a sensible warning gate appropriate for#![no_std]Soroban code).contracts/source passes both checks (applycargo fmtand fix or#[allow]justified clippy findings).rustfmtandclippycomponents to the toolchain setup step.Files to touch
.github/workflows/ci.ymlcontracts/(formatting fixes as needed)Out of scope
npm run lint).