Hello,
Is there a way for clang-tidy to support negative convention ?
For example, I would like to forbid public members to start with an m_.
I can use key: readability-identifier-naming.PublicMemberCase,value: camelBack to identify such cases, but not for automatically fixing it as will turn a m_attr into a mAttr whereas what I want is attr.
Any help appreciated.
Regards,
David Come
Hi,
readability-identifier-naming
has only support for adding prefixes/postfixes at the moment. This is functionality you would need to implement yourself (patches welcome ;))
It might be a good idea to allow an additional, optional configuration that specifies a regex names must adhere to. This would probably give a better experience for special demands like this.
Best, Jonas
Ok, thanks for the answers. I’ll look into it at some point in the foreseeable future (couple of months).
David