Skip to content

fix(ci): Migrate lints from .cargo/config.toml to Cargo.toml#10380

Draft
upbqdn wants to merge 3 commits intomainfrom
fix/workspace-lints
Draft

fix(ci): Migrate lints from .cargo/config.toml to Cargo.toml#10380
upbqdn wants to merge 3 commits intomainfrom
fix/workspace-lints

Conversation

@upbqdn
Copy link
Member

@upbqdn upbqdn commented Mar 10, 2026

Motivation

Solution

Move lint configuration from .cargo/config.toml to [workspace.lints] in Cargo.toml, which is immune to RUSTFLAGS environment variable overrides.

Specifications & References

@upbqdn upbqdn self-assigned this Mar 10, 2026
@upbqdn upbqdn added C-bug Category: This is a bug C-exclude-from-changelog Category: The PR should be excluded from the changelog and release notes labels Mar 10, 2026
@upbqdn upbqdn changed the title fix(ci): migrate lints from .cargo/config.toml to fix(ci): Migrate lints from to .cargo/config.toml to Cargo.toml Mar 10, 2026
@upbqdn upbqdn changed the title fix(ci): Migrate lints from to .cargo/config.toml to Cargo.toml fix(ci): Migrate lints from .cargo/config.toml to Cargo.toml Mar 10, 2026
The setup-rust-toolchain action sets RUSTFLAGS="-D warnings" by default,
which overrides .cargo/config.toml rustflags entirely. This silently
dropped all custom lints (clippy::print_stdout, unsafe_code, missing_docs,
etc.) since #9883.

Move lint configuration to [workspace.lints] in Cargo.toml, which is
immune to RUSTFLAGS overrides.

Closes #10378
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good but will be nice to confirm it. We can add a temporary commit with:

println!("lint test");

Confirm clippy::print_stdout fires in CI, then drop the commit before merging.

@upbqdn
Copy link
Member Author

upbqdn commented Mar 10, 2026

Confirmed in https://github.com/ZcashFoundation/zebra/actions/runs/22908800240/job/66474979047?pr=10380#step:5:951. I'm going to remove the commit and force-push.

@upbqdn upbqdn force-pushed the fix/workspace-lints branch from f54f000 to 2a1bc5c Compare March 10, 2026 16:07
@upbqdn upbqdn force-pushed the fix/workspace-lints branch 2 times, most recently from 44ee571 to ca81192 Compare March 10, 2026 16:08
@upbqdn upbqdn force-pushed the fix/workspace-lints branch from ca81192 to e99bfd6 Compare March 10, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category: This is a bug C-exclude-from-changelog Category: The PR should be excluded from the changelog and release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI ignores custom lints

2 participants