Skip to content

[multiple_crate_versions]: add a configuration option for allowed duplicate crates #12179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

y21
Copy link
Member

@y21 y21 commented Jan 21, 2024

Closes #12176

changelog: [multiple_crate_versions]: add a configuration option for allowed duplicate crates

@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2024

r? @dswij

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 21, 2024
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

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

Looks pretty straightforward. LGTM, thanks for this!

@dswij
Copy link
Member

dswij commented Jan 24, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 24, 2024

📌 Commit 95a084f has been approved by dswij

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 24, 2024

⌛ Testing commit 95a084f with merge 76a75bf...

@bors
Copy link
Contributor

bors commented Jan 24, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: dswij
Pushing 76a75bf to master...

@bors bors merged commit 76a75bf into rust-lang:master Jan 24, 2024
@mightyiam
Copy link

Wow. Thank you, @y21 !

bors added a commit that referenced this pull request Jan 24, 2024
Suggest existing configuration option if one is found

While working on/testing #12179, I made the mistake of using underscores instead of dashes for the field name in the clippy.toml file and ended up being confused for a few minutes until I found out what's wrong. With this change, clippy will suggest an existing field if there's one that's similar.
```
1 | allow_mixed_uninlined_format_args = true
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: perhaps you meant: `allow-mixed-uninlined-format-args`
```
(in hindsight, the current behavior of printing all the config options makes it obvious in most cases but I still think a suggestion like this would be nice to have)

I had to play around with the value a bit. A max distance of 5 seemed a bit too strong since it'd suggest changing `foobar` to `msrv`, which seemed odd, and 4 seemed just good enough to detect a typo of five underscores.

changelog: when an invalid field in clippy.toml is found, suggest the closest existing one if one is found
@xFrednet
Copy link
Member

Hey @y21, small FYI for the next time when you add a new configuration: You can link to the configuration in the changelog message. Something like this would be perfect:

changelog: [`multiple_crate_versions`]: Added the [`allowed-duplicate-crates`] configuration to allow specific crates

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

Successfully merging this pull request may close these issues.

Allow specific duplicate dep in multiple_crate_versions
6 participants