Skip to content

ci: enforce consistent code formatting across smartcontract crate - #560

Merged
Naomi-Gift merged 2 commits into
HubDApp:mainfrom
AbuJulaybeeb:ci/cargo-fmt-check-512
Aug 20, 2026
Merged

ci: enforce consistent code formatting across smartcontract crate#560
Naomi-Gift merged 2 commits into
HubDApp:mainfrom
AbuJulaybeeb:ci/cargo-fmt-check-512

Conversation

@AbuJulaybeeb

Copy link
Copy Markdown
Contributor

Summary

  • Enforced consistent Rust code formatting across the repository in alignment with CI fmt check requirements.
  • Resolved styling and whitespace deviations across 18 smart contract source files in dongle-smartcontract/src/.

Why

Unformatted code accumulates over collaborative development, leading to CI formatting job failures and noisy diffs during code review. Aligning all source files with the standard rustfmt toolchain rules ensures the fmt CI check succeeds cleanly on all PRs.

Implementation

  • Applied standard cargo fmt --all to resolve indentation, parameter wrapping, blank lines, and struct/enum field formatting across dongle-smartcontract/src/.
  • Preserved all contracts, logic, and test behaviors without functional modifications.

Testing

  • cargo fmt --all -- --check
  • cargo clippy -p dongle-contract --target wasm32-unknown-unknown -- -D warnings
  • cargo test -p dongle-contract (522 passed, 0 failed)
  • cargo build -p dongle-contract --target wasm32-unknown-unknown --release
  • python3 scripts/validate_deployments.py

Scope / Risk

  • Scope: Code style and formatting only in dongle-smartcontract/src/.
  • Risk: Low / None (zero business logic or interface changes; all 522 unit and integration tests passing).

Issue

closes #512

@Naomi-Gift
Naomi-Gift merged commit fde9721 into HubDApp:main Aug 20, 2026
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.

ci: add cargo fmt check to enforce consistent code formatting in CI

2 participants