Context: Important correction: this repo (contracts) has no .github/workflows directory at all. The monorepo it was split from had contract-fuzzing.yml, gas-regression.yml, and a clippy.yml that ran working-directory: ./contracts -- but those lived at the monorepo root, not nested under contracts/, so git filter-repo --path contracts/ did not carry them over. They're now dead weight in Stellar-inights (pointing at a directory that no longer exists there) and simply absent here.
Where:
.github/workflows/clippy.yml (new in this repo)
- Reference:
Stellar-Insightss/Stellar-inights still has the old .github/workflows/clippy.yml you can adapt (drop the ./backend job, keep only the ./contracts job, fix the working directory since it's now the repo root)
What to do:
- Recreate a clippy CI job that runs at the workspace root (no
working-directory needed now) and enforces unwrap_used = deny, expect_used = deny, panic = deny -- these are already configured in [workspace.lints.clippy] in the root Cargo.toml, this issue is about enforcing that in CI, not configuring the lint.
Suggested approach:
- Pull the old
.github/workflows/clippy.yml from Stellar-Insightss/Stellar-inights (it still exists there, just dead) as your starting point rather than writing a Soroban/Rust clippy workflow from scratch.
- Strip the
./backend-specific job (that workflow originally covered both backend and contracts in one file) and drop the working-directory: ./contracts since this repo's root is the contracts workspace now.
- Point it at
rustup target add wasm32-unknown-unknown plus a cargo clippy --workspace --all-targets -- -D warnings (or equivalent) so the [workspace.lints.clippy] deny rules in the root Cargo.toml actually get enforced somewhere, not just locally.
- Test it on a throwaway branch with a deliberate
unwrap() added to confirm the workflow actually fails before you consider this done.
Watch out for:
[workspace.lints.clippy] being configured in Cargo.toml does not mean CI enforces it -- a contributor who never runs cargo clippy locally can merge violations today. Confirm this workflow is what closes that gap, don't assume the Cargo.toml config alone is sufficient.
- Match the Rust toolchain version this workspace actually needs (check for a
rust-toolchain.toml or the edition in Cargo.toml) rather than defaulting to stable blindly.
Definition of done:
Context: Important correction: this repo (
contracts) has no.github/workflowsdirectory at all. The monorepo it was split from hadcontract-fuzzing.yml,gas-regression.yml, and aclippy.ymlthat ranworking-directory: ./contracts-- but those lived at the monorepo root, not nested undercontracts/, sogit filter-repo --path contracts/did not carry them over. They're now dead weight inStellar-inights(pointing at a directory that no longer exists there) and simply absent here.Where:
.github/workflows/clippy.yml(new in this repo)Stellar-Insightss/Stellar-inightsstill has the old.github/workflows/clippy.ymlyou can adapt (drop the./backendjob, keep only the./contractsjob, fix the working directory since it's now the repo root)What to do:
working-directoryneeded now) and enforcesunwrap_used = deny,expect_used = deny,panic = deny-- these are already configured in[workspace.lints.clippy]in the rootCargo.toml, this issue is about enforcing that in CI, not configuring the lint.Suggested approach:
.github/workflows/clippy.ymlfromStellar-Insightss/Stellar-inights(it still exists there, just dead) as your starting point rather than writing a Soroban/Rust clippy workflow from scratch../backend-specific job (that workflow originally covered bothbackendandcontractsin one file) and drop theworking-directory: ./contractssince this repo's root is the contracts workspace now.rustup target add wasm32-unknown-unknownplus acargo clippy --workspace --all-targets -- -D warnings(or equivalent) so the[workspace.lints.clippy]deny rules in the rootCargo.tomlactually get enforced somewhere, not just locally.unwrap()added to confirm the workflow actually fails before you consider this done.Watch out for:
[workspace.lints.clippy]being configured inCargo.tomldoes not mean CI enforces it -- a contributor who never runscargo clippylocally can merge violations today. Confirm this workflow is what closes that gap, don't assume the Cargo.toml config alone is sufficient.rust-toolchain.tomlor theeditioninCargo.toml) rather than defaulting tostableblindly.Definition of done:
.github/workflows/clippy.ymlexists and runs on PRs/pushesunwrap()/expect()/panic!is introduced in contract codeclippy.yml/contract-fuzzing.yml/gas-regression.ymlinStellar-inightsare removed or fixed as a follow-up (flagged separately)