Conversation

BenjaminBrienen

Adds a new lint for when your workspace has a lint configuration table, but a member of the workspace implicitly does not inherit that configuration. This has bitten me in the butt many times in my large workspace with many crates where I forget to add lints.workspace = true.

Example in rust-analyzer!

Worked on with @NateD-MSFT during the RustWeek workshop.

changelog: [missing_workspace_lints]: Added new lint to warn when a project is in a workspace with workspace lint configuration, but has not explicitly configured lints.workspace.

@rustbot

r? @samueltardieu

rustbot has assigned @samueltardieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added the S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested partieslabel Jun 21, 2025
@BenjaminBrienenBenjaminBrienen force-pushed the unused-workspace-lints branch 3 times, most recently from 1e4b341 to 9ecf6da Compare June 21, 2025 01:26
@BenjaminBrienenBenjaminBrienen force-pushed the unused-workspace-lints branch from 9ecf6da to 9d20899 Compare June 21, 2025 01:28
@samueltardieu

I think this should be a Cargo lint instead. "lints" are probably not the only key which should be checked, for example edition, rust-version and license should be as well.

@samueltardieu

Worked on with @NateD-MSFT during the RustWeek workshop.

r? @llogiq

@rustbotrustbot assigned llogiq and unassigned samueltardieu Jun 21, 2025
@BenjaminBrienen

Clippy already has a few cargo lints and I think it even checks for missing basic metadata (allow by default). If they get moved into cargo itself, this could move with them?

Sign up for free to join this conversation on . Already have an account? Sign in to comment
S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties
None yet

Successfully merging this pull request may close these issues.