-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
upper_case_acronyms: move lint from style to pedantic lint group #6775
Conversation
The lint does point out inconsistency with the Rust naming convention, but the fact that rustc does not warn about the inconsistency by default means that clippy probably should not warn by default either. changelog: move upper_case_acronyms lint from style to pedantic group.
r? @flip1995 (rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ Thanks! |
📌 Commit 0eefa61 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
FWIW we just ran into some code that would be caught by this lint at Embark, and were surprised that this isn't a default warning by rustc. I think I would expect the opposite, that this lint warns by default and even be uplifted from clippy to rustc, since this naming convention for enum variants is actually part of RFC 430, and I would expect rustc to warn when things mismatch that RFC. |
Hmm.
I'm open to a revert of my pr but perhaps we can discuss this in the upcoming clippy meeting tomorrow. |
@XAMPPRocky do you have some bugs that the lint found something like that? |
There are numerous projects that have |
The case we had looked something like this. enum Direction {
WEST,
NORTH,
EAST,
SOUTH,
}
I mean I think it’s no less arbitrary than |
I see, I think it makes sense to still warn for fully upper-case names. |
#6788 moves the lint back to the style group. |
The lint does point out inconsistency with the Rust naming convention,
but the fact that rustc does not warn about the inconsistency by default
means that clippy probably should not warn by default either.
changelog: move upper_case_acronyms lint from style to pedantic group.