Skip to content

ci(contracts): add cargo fmt --check job - #265

Open
thefifthdev wants to merge 1 commit into
codebestia:mainfrom
thefifthdev:ci/136-cargo-fmt-check
Open

ci(contracts): add cargo fmt --check job#265
thefifthdev wants to merge 1 commit into
codebestia:mainfrom
thefifthdev:ci/136-cargo-fmt-check

Conversation

@thefifthdev

@thefifthdev thefifthdev commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Adds a dedicated fmt job to .github/workflows/contracts-ci.yml that runs cargo fmt --all -- --check across all packages in the Soroban Rust workspace.

  • The job installs only the rustfmt component — no wasm32 target and no caching — so it runs in well under 30 seconds.
  • Ran cargo fmt --all over the existing contracts to clean the baseline (proposals package) so the check passes on merge.

Acceptance criteria

  • A PR with unformatted Rust code in any contract fails the fmt job
  • The fmt job completes in under 30 seconds (rustfmt-only toolchain, no build)
  • Existing code passes the check on merge (baseline reformatted)

Closes #136

Add a dedicated `fmt` job to the contracts CI workflow that runs
`cargo fmt --all -- --check` across the Soroban Rust workspace. The job
installs only the rustfmt component (no wasm target, no caching) so it
completes quickly and fails any PR containing unformatted Rust code.

Also runs `cargo fmt --all` over the existing contracts to clean the
baseline so the check passes on merge.

Closes codebestia#136
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.

2 participants