Skip to content

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

Merged
mergify[bot] merged 1 commit into
mainfrom
fix/workspace-lints
Mar 25, 2026
Merged

fix(ci): Migrate lints from .cargo/config.toml to Cargo.toml#10380
mergify[bot] merged 1 commit into
mainfrom
fix/workspace-lints

Conversation

@upbqdn

@upbqdn upbqdn commented Mar 10, 2026

Copy link
Copy Markdown
Member

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
@upbqdn
upbqdn force-pushed the fix/workspace-lints branch from 259ceea to 4eedc8a Compare March 10, 2026 10:47

@oxarbitrage oxarbitrage left a comment

Copy link
Copy Markdown
Contributor

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

upbqdn commented Mar 10, 2026

Copy link
Copy Markdown
Member Author

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.

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
@mergify mergify Bot added the queued label Mar 25, 2026
@mergify

mergify Bot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 4 hours 1 minute 20 seconds in the queue, including 57 seconds running CI.

Required conditions to merge

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

3 participants