[clang-tidy] readability-identifier-naming concerns


next follows some points related to the readability-identifier-naming checker I would like some feedback.

Different styles for different part of the checks

In my personal library projects I use to use one style (C++ standard like style) for the library part and another style (Java style) for the tests.

Is there a possibility to have different styles applied to different files?

Is there a possibility to select the style depending on the namespace?

Different styles for different stylistic usage of the same AST kind of identifier

Another use case where I need different styles is the following.

In <=C++17 where we don’t have concepts, it is usual to define some template alias in CamelCase for traits representing concepts constrains, e.g. EqualityComparable, Regular. I use also lower_case for traits. That is I use the same kind of Identifier with different intents.

Is there a possibility to associate two identifier styles for the same kind of identifier?

I work also on a project where the enumerators can be in UPPER_CASE or lower_case.

Implementation details identifiers

I would like lower_case to support a possible prefix _ e.g. _var

I use these to mean that these names are in some way an implementation detail, even if they are public.

Note that var_ is valid lower_case symbol.

Do others use this kind of names?

Would I need a specific _lower_case style?


When I use template parameters I use to use Args, Ts, T.

However I’m getting warnings when I set the case to CamelCase.

I consider all those identifiers having CamelCase style.

What is the style I should associate to those identifiers?

What identifies a CamelCase identifier? on that doesn’t contain _ and start by capital letter and has an additional capital letter?

Acronyms and lower_case

I use to use UPPERCASE for acronyms o mixed with lower_case. I name this style lower_ACHRO_case.

That is, lower_ACHRO_case, support segments separated by _ that are either LOWERCASE or UPPERCASE.

Now I’m forced to aNy_CasE to support this kind of identifiers.

Do others use this kind of names?


BS proposed this style for Concepts and template parameters.

That is, Snake_Case, support segments separated by _ that are start by a Capital letter and the other are lower case

Now I’m forced to aNy_CasE to support this kind of identifiers.

Any plans to support this style?

Besrt regards,

Vicente Botet