Identifiers for classes, functions, classes etc. should follow our coding styles. Most use lower case with underscore, classes have postfix _t etc.
clang-tidy can check this. See https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html .
Here is a first, incomplete try at a config snippet which can be added to .clang-tidy:
- key: readability-identifier-naming.ClassCase
value: lower_case
- key: readability-identifier-naming.ClassSuffix
value: _t
- key: readability-identifier-naming.PrivateMemberPrefix
value: m_
- key: readability-identifier-naming.StructCase
value: lower_case
- key: readability-identifier-naming.EnumCase
value: lower_case
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.FunctionIgnoredRegexp
value: luaX.*
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.NamespaceCase
value: lower_case
Identifiers for classes, functions, classes etc. should follow our coding styles. Most use lower case with underscore, classes have postfix
_tetc.clang-tidy can check this. See https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html .
Here is a first, incomplete try at a config snippet which can be added to
.clang-tidy: