-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustc -Wall
to show all possible warnings
#10234
Comments
At least with clang has a fairly useless |
@thestinger Oh, wow! Thanks for the detailed, thoughtful response. I'll definitely look into each of those options. |
(FWIW the warnings are listed in |
I think there should be a catch-all lint group, that objectively enables all lints. Whenever programmers decide subjectively to allow lints in some instances, they may then do that on a case-by-case basis. And if an implemented lint simply does not make sense at all then it should be improved/removed. The existing lint group
@Mark-Simulacrum can this issue be reopened? |
Reopening. However, I think we shouldn't have any sort of "enable all lints" option; rustc's lints are already all intended to have no or very few false positives (and as such are enabled by default where that makes sense). Could you talk about which specific lints are missing from the default warnings built-in list? I'm not personally aware of any. I'm also somewhat concerned that a |
Issue triage:
I think it might be useful to have a message explaining why If there's interest in doing this, I could make a PR. |
…, r=estebank Add info message for -Wall command Users coming from other languages (namely C and C++) often expect to use a -Wall flag. Rustc doesn't support that, and previously it simply printed that it didn't recognize the "all" lint. This change makes rustc print out a help message, explaining: - Why there is no -Wall flag - How to view all the available warnings - Point out that the most commonly used warning is -Wunused - Instead of using a command-line flag, the user should consider a !#[warn(unused)] directive in the root of their crate. I tried to keep the language consistent with the other usage help. Comment if I should change anything. closes rust-lang#10234, if accepted.
It would be nice if
rustc -Wall
turned on all warnings, like how other compilers work.The text was updated successfully, but these errors were encountered: