RS.CLIPPY.MIN_IDENT_CHARS
Disallows idents that are too short
What it does
Checks for identifiers which consist of a single character (or fewer than the configured threshold).
Note: This lint can be very noisy when enabled; it may be desirable to only enable it temporarily.
Why restrict this?
To improve readability by requiring that every variable has a name more specific than a single letter can be.
Example
for m in movies {
let title = m.t;
}
Use instead:
for movie in movies {
let title = movie.title;
}
Configuration
-
allowed-idents-below-min-chars: Allowed names below the minimum allowed characters. The value".."can be used as part of the list to indicate, that the configured values should be appended to the default configuration of Clippy. By default, any configuration will replace the default value.(default:
["i", "j", "x", "y", "z", "w", "n"]) -
min-ident-chars-threshold: Minimum chars an ident can have, anything below or equal to this will be linted.(default:
1)