Pedant is a clang tool for catching inconsistent identifier names in your code.
- Clone the repo in
clang/tools/extra
- Add
add_subdirectory(pedant)
toclang/tools/extra/CMakeLists.txt
orpedant
to the DIRS variable inclang/tools/extra/Makefile
- Build
pedant ~/b.cpp -member=prefix-m_ --
This checks whether the class members in b.cpp have m_
as a prefix.
- class
- function
- member
- method
- all
- none
- fooprefixed
- CamelCase
- camelCaseLite
- usep_lcase
- prefix
- regex
- More Match targets.
- Test cases.
- Use proper diagnostics instead of printing out results.
- Add
analysis
mode in which statistical data is generated for different Match targets instead of matching against specific requirements.