-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add more lint checks for style #3070
Comments
I put this on as a 1.0 milestone because I think that having such lint checks enabled (to warn, probably) by default is something we really ought to have before we release. Specifically I am thinking of warning if variant names are lowercase or variable names are upper case---capitalization rules on types I think are less important. |
oops, closed by accident (wrong bug) |
Visiting for bug triage, 2013 june 26. I guess this bug is really a meta-bug, collecting lint additions that the rust dev team wants in as rules for the rustc and standard library code base before 1.0 is released. There is still at least issue #4639 to resolve, so I'm leaving this open. (Once #4639 is resolved, then I'm guessing we'll close and reopen it as necessary to track whether lint items remain to do.) |
Visiting for triage; nothing to add. |
Still want more of these. Any ideas? |
accepted for P-low |
tagging as a good mentorship bug, with @brson as the mentor. |
Some more ideas:
|
@huonw Does all-caps count as an instance of camel-case? If I need more than one letter in a type-param, I will often go for a (short) all-caps word. |
Oh, it probably passes the camel case checker, but I normally do I guess we need to decide on a style for type parameters before linting them. |
@huonw I suspect the prevailing style is to use less than 26 type parameters. ;) |
I believe camel case is more common for typarams than allcaps. |
I'd love to start contributing! Is this a good place to start? |
#15773 extended the existing lints to detect more cases where the Rust style for naming is not being used. That means that it detects non-uppercase statics, non-camel-case types and type parameters, and non-snake-case variables, struct/struct variant fields, lifetimes, functions, methods, and modules. (I might’ve missed something, but I think that’s it.) Is there anything else left with regards to naming? And what other lints are missing for this issue to be closed? Also, should This is what I’ve come up with in the way of remaining style lints:
|
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#609 |
Format a paren expr with double slash comment
disable no-merges check for now It leads to false warnings on sync PRs until rust-lang/triagebot#1720 lands.
We have one now that checks for camel case on types, variants and traits.
We have some other rules:
consts are all capsUppercase statics lint #7523Let's have lint passes for those as well.
The text was updated successfully, but these errors were encountered: