osm2pgsql icon indicating copy to clipboard operation
osm2pgsql copied to clipboard

Make sure identifiers are in line with policy

Open joto opened this issue 6 months ago • 0 comments

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

joto avatar Jul 18 '25 20:07 joto