diff options
author | 2017-09-11 19:38:38 +0200 | |
---|---|---|
committer | 2017-09-12 14:04:10 +0200 | |
commit | 5a77f426e0896031973ce1dc965f05e014ee9a24 (patch) | |
tree | e3da3597c6a3c0edbf140e95b0f48d37e899ae4e /src/main/java/com/google/devtools/common/options/OptionDefinition.java | |
parent | 943874f4328690df4051ab1a7e23e377edc11dab (diff) |
Skylint: improve the naming conventions checker
Changes in behavior:
* Local variables are also allowed to be UPPER_SNAKE_CASE.
Upper case means that they're constants but this is not checked yet.
* Providers are required to be UpperCamelCase. A variable FooBar
is considered a provider if it appears in an assignment of the form
"FooBar = provider(...)"
* Shadowing of builtins (e.g. "True = False", "def fail()") is
not allowed
* The single-letter variable names 'O', 'l', 'I' are disallowed
since they're easy to confuse
* Multi-underscore names ('__', '___', etc.) are disallowed
* Single-underscore names may only be written to, as in
a, _ = tuple
They may not be read, as in "f(_)".
In the process, I also moved some code from UsageChecker to
AstVisitorWithNameResolution to prevent duplication in
NamingConventionsChecker.
RELNOTES: none
PiperOrigin-RevId: 168250396
Diffstat (limited to 'src/main/java/com/google/devtools/common/options/OptionDefinition.java')
0 files changed, 0 insertions, 0 deletions