Uh oh!
There was an error while loading. Please reload this page.
Allow capital L as variable name - #12959
Conversation
When the lint uppercase_variables is disallowed/warned about/denied, an uppercase L (ell) should be still allowed as its lowercase variant is too similar to an uppercase i or an 1 (one).
emberian
commented
Mar 17, 2014
This doesn't make sense to me. "Disallow uppercase variables, except this random one-character one" |
tbu-
commented
Mar 17, 2014
Well, the point is that you can have all the small latin letters from a-z as single-character variable names, except for the small L, which is why it is used in its capital form in some codebases. letI = 0;let l = 0;let k = I + l + 1;See for example the above negative-example. |
tbu-
commented
Mar 17, 2014
If this still does not make sense to you, feel free to close this pull request. :) |
emberian
commented
Mar 17, 2014
I'm more inclined to say "use different variable names" than "add corner case to lint", but I'll leave it to someone else to decide about this PR. |
alexcrichton
commented
Mar 17, 2014
I think that this is a niche enough use case that already has enough controls over it that it's not that necessary. Thanks for the PR, though! |
huonw
commented
Mar 17, 2014
(The work-around of just |
Fix `test_rainbow_highlighting` gate CC rust-lang/rust-analyzer#12903 (review)
Allow capital L as variable name
When the lint uppercase_variables is disallowed/warned about/denied, an
uppercase L (ell) should be still allowed as its lowercase variant is too
similar to an uppercase i or an 1 (one).