[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks
Shane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 12 22:15:45 PST 2020
smhc added a comment.
In D90282#2391360 <https://reviews.llvm.org/D90282#2391360>, @aaron.ballman wrote:
> In D90282#2391005 <https://reviews.llvm.org/D90282#2391005>, @njames93 wrote:
>
>> Should this be a NamingStyle option instead.
>> `{key: readability-identifier-naming.ParameterShortSizeThreshold, value: 2}`
>> WDYT?
>
> I think that makes a lot of sense -- I can imagine wanting to enforce different identifier lengths depending on whether we're spelling a type name vs a local variable name, etc.
I considered this but thought the configuration and documentation would be quite cumbersome. We could provide a global setting (as already done) and allow refining it further by type if needed? For what it's worth I only need it for local variables, I imagine that would be the main use case.
Or should we simply add this threshold to every type of name, similar to how suffix, prefix and case style have been done?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90282/new/
https://reviews.llvm.org/D90282
More information about the cfe-commits
mailing list