llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[clang-tidy] readability-identifier-naming: Typedef defintions should allow to inherit rules from types they redefine.

Open labombrador opened this issue 4 months ago • 3 comments

If I use the check readability-identifier-naming and the rules I set for enum, e.g. EnumCase won't check for typedef definitions of the kind typedef enum {} NewEnum. A new option TypedefInheritTypeConfig shall allow to inherit the current configured checks (e.g. EnumCase: CameCase) for each redefined type (here enum).

labombrador avatar Aug 03 '26 13:08 labombrador

@llvm/issue-subscribers-clang-tidy

Author: labombrador

If I use the check `readability-identifier-naming` and the rules I set for enum, e.g. `EnumCase` won't check for `typedef` definitions of the kind `typedef enum {} NewEnum`. A new option `TypedefInheritTypeConfig` shall allow to inherit the current configured checks (e.g. `EnumCase: CameCase`) for each redefined type (here `enum`).

I can give this a try

davidmenggx avatar Aug 03 '26 17:08 davidmenggx

Cool, thanks for the effort!

labombrador avatar Aug 04 '26 06:08 labombrador