[cfe-dev] [clang-tidy] Support for negative convention

Jonas Toth via cfe-dev cfe-dev at lists.llvm.org
Wed Feb 27 08:26:04 PST 2019


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

Am 27.02.19 um 15:50 schrieb David Côme via cfe-dev:
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190227/d0e60e9e/attachment.html>


More information about the cfe-dev mailing list