Skip to content
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

Move clippy::module_name_repetitions to restriction (from pedantic) #13541

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

xFrednet
Copy link
Member

@xFrednet xFrednet commented Oct 12, 2024

Rational:

  • Too pedantic IMO, I use #[warn(pedantic)] in my personal projects, but then always allow this lint. The fact that we had a few #[expect(clippy::module_name_repetitions)] also underlines this point IMO
  • STD doesn't do this either. Examples:
    • std::vec::Vec
    • std::collections::vec_deque::VecDequeue
  • Most commonly ignored lints on crates.io #7666 commonly ignored

changelog: Move [module_name_repetitions] to restriction (from pedantic)
#13541

@rustbot
Copy link
Collaborator

rustbot commented Oct 12, 2024

r? @blyxyas

rustbot has assigned @blyxyas.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 12, 2024
…ic`)

Rational:
- Too pedantic IMO, it's often better to have fine grained modules and
  then rexport stuff instead of one gigantic file
- STD doesn't do this either. Examples:
  - std::vec::Vec
  - std::collections::vec_deque::VecDequeue
- rust-clippy#7666 commonly ignored
Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

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

I agree of the category change and approve, but just in case, is there any FCP-like process for moving lints between categories? I searched on Zulip and coulnd't find anything =^w^=

@kpreid
Copy link
Contributor

kpreid commented Oct 12, 2024

STD doesn't do this either. Examples:

  • std::vec::Vec
  • std::collections::vec_deque::VecDequeue

It's not documented, but the lint specifically allows this case, and only lints prefixes and suffixes:

https://github.com/rust-lang/rust/blob/8f8bee4f60d9d3769f75c70d558c27a95761c554/src/tools/clippy/clippy_lints/src/item_name_repetitions.rs#L407-L408

I don't mean to object to this change, only that this specific argument for it is not correct.

@xFrednet
Copy link
Member Author

is there any FCP-like process for moving lints between categories?

There hasn't been one in the past. If you want you can create an FCP. I'd do that if I was unsure about such a change

@blyxyas
Copy link
Member

blyxyas commented Oct 13, 2024

LGTM, thanks! ❤️

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 13, 2024

📌 Commit 8b075fc has been approved by blyxyas

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Oct 13, 2024

⌛ Testing commit 8b075fc with merge 43e99e5...

@bors
Copy link
Collaborator

bors commented Oct 13, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: blyxyas
Pushing 43e99e5 to master...

@bors bors merged commit 43e99e5 into rust-lang:master Oct 13, 2024
8 checks passed
@xFrednet xFrednet deleted the 0-module-name-rep branch October 14, 2024 07:14
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.

5 participants