Add lint to enforce repository inheritance in workspaces#16734
Add lint to enforce repository inheritance in workspaces#16734moabo3li wants to merge 2 commits intorust-lang:masterfrom
Conversation
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
f327c59 to
2bcbbe4
Compare
|
While I was debugging to solve the failing tests, I added a log to the {"lint_level":"Allow","is_allow":true}Even though I already set I discovered a latent bug in In When priorities tie (both So when a user writes
Since This affects any lint whose name sorts after its group name:
To verify, I temporarily renamed Renaming it back to if this confirmed i will make a pr to solve this before go into in this pr the fix i propose } else {
// Use priority -1 so any explicitly-set lint/group value (priority >= 0)
// beats an unset default regardless of the name-based tiebreaker.
(unspecified_level, reason, -1)
}This also corrects the reason text for |
|
even this lint when i renamed to |
2bcbbe4 to
9777309
Compare
…inheritance in workspaces
…repository inheritance in workspaces
9777309 to
d6ebd7e
Compare
What does this PR try to resolve?
This patch adds a new pedantic lint,
uninherited_repository, that fires whenever a workspace member setspackage.repositoryexplicitly rather than usingrepository.workspace = true. The lint suggests the fix inline.Fixes:#15870