summaryrefslogtreecommitdiffstats
path: root/.clang-tidy
blob: 32816a96a49875041ff24c00464bc3178880bbcc (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
52
53
54
55
56
57
58
59
60
61
---
Checks: |-
  bugprone-*,
  cert-*,
  google-readability-casting,
  misc-*,
  readability-*,

  -bugprone-assignment-in-if-condition,
  -bugprone-branch-clone,
  -bugprone-easily-swappable-parameters,
  -bugprone-inc-dec-in-conditions,
  -bugprone-multi-level-implicit-pointer-conversion,
  -bugprone-narrowing-conversions,
  -bugprone-not-null-terminated-result,
  -bugprone-sizeof-expression,
  -bugprone-suspicious-string-compare,
  -cert-dcl03-c,
  -cert-dcl16-c,
  -clang-analyzer-deadcode.DeadStores,
  -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
  -clang-analyzer-unix.Malloc,
  -clang-analyzer-valist.Uninitialized,
  -clang-analyzer-optin.core.EnumCastOutOfRange,
  -misc-include-cleaner,
  -misc-macro-parentheses,
  -misc-no-recursion,
  -misc-static-assert,
  -misc-unused-parameters,
  -readability-avoid-nested-conditional-operator,
  -readability-avoid-unconditional-preprocessor-if,
  -readability-braces-*,
  -readability-cognitive-complexity,
  -readability-else-after-return,
  -readability-function-cognitive-complexity,
  -readability-identifier-length,
  -readability-isolate-declaration,
  -readability-magic-numbers,
  -readability-non-const-parameter,
  -readability-redundant-declaration,
  -readability-uppercase-literal-suffix,
  -clang-analyzer-core.UndefinedBinaryOperatorResult

# TODO: remove `-clang-analyzer-core.UndefinedBinaryOperatorResult` when we
# upgrade to Clang >=18 (it's a false positive )

WarningsAsErrors: |-
  cert-*,
  clang-analyzer-*,
  misc-*,
  readability-*,
  -readability-non-const-parameter,

HeaderFilterRegex: 'contrib/ucw/*.h'
CheckOptions:
  - key:             readability-identifier-naming
    value:           'lower_case'
  - key:             readability-function-size.StatementThreshold
    value:           '400'
  - key:             readability-function-size.LineThreshold
    value:           '500'