New LibTooling based tool to check identifier case

Hello there,

Some time ago, I wrote a simple tool upon LibTooling to check that the identifiers used were conforming to a given set of rules.

For the same reason people use code formatting guidelines, and tools to enforce them, people usually have guidelines regarding the casing of identifiers… but there are not many tools out there for that (or not that I knew of).

I advertised it a little bit on reddit, people seemed interested and I had some contributions since then, so I thought I could talk about it here as well. Here is the link for the curious, feel free to comment here or there!


Any reason this is not done as clang-tidy check (which also supports fixits)?

FWIW, I had a similar thought. At first glance, that does seem to be
a better place for it.

-- Meador

No particular reason except the lack of knowledge. I didn’t know there was a tool that could be easily extended.
Initially it was just a sample code to play with the LibTooling API without any prior knowledge, and it’s still very simple.

If the idea of such checks is popular, then I could happily offer to implement it as clang-tidy checks.


I have finally implemented the same checker as a clang-tidy check if anyone is interested. The patch is attached.


0001-clang-tidy-Add-new-IdentifierCase-check.patch (39.5 KB)


Thanks for pointing me to this. Answered on the relevant cfe-commits thread.