summaryrefslogtreecommitdiff
path: root/src/.clang-tidy
blob: a778a65d788ed262ea7a2ae34a226e04297d5d67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
InheritParentConfig: true
Checks: 'readability-identifier-naming'
CheckOptions:
  # Type names
  - key: readability-identifier-naming.ClassCase
    value: CamelCase
  - key: readability-identifier-naming.StructCase
    value: CamelCase
  - key: readability-identifier-naming.UnionCase
    value: CamelCase
  - key: readability-identifier-naming.EnumCase
    value: CamelCase
  - key: readability-identifier-naming.ClassIgnoredRegexp
    value: ^hk(.*)
  - key: readability-identifier-naming.StructIgnoredRegexp
    value: ^hk(.*)
  - key: readability-identifier-naming.UnionIgnoredRegexp
    value: ^hk(.*)
  - key: readability-identifier-naming.EnumIgnoredRegexp
    value: ^hk(.*)

  # Variable naming conventions are not enforced as there are many situations
  # which require deviating from snake_case names.

  # Class/struct members (clang-tidy does not distinguish classes from structs)
  - key: readability-identifier-naming.MemberCase
    value: CamelCase
  - key: readability-identifier-naming.MemberPrefix
    value: m
  - key: readability-identifier-naming.MemberIgnoredRegexp
    # Allow names that end with _[dsma] (for AI parameter variables)
    value: (^_(.*)|m(.*)(_[dsma]))

  # Public class/struct members
  - key: readability-identifier-naming.PublicMemberCase
    value: lower_case
  - key: readability-identifier-naming.PublicMemberPrefix
    value: ''
  - key: readability-identifier-naming.PublicMemberIgnoredRegexp
    # clang-tidy does not distinguish classes from structs, so we allow names like mMemberNames
    # for public members as well (even for structs).
    value: (^_(.*)|^m[A-Z](.*))

  # Identifier names
  - key: readability-identifier-naming.MacroDefinitionCase
    value: UPPER_CASE
  - key: readability-identifier-naming.ScopedEnumConstantCase
    value: CamelCase
  - key: readability-identifier-naming.ScopedEnumConstantIgnoredRegexp
    value: ^_(.*)