summaryrefslogtreecommitdiff
path: root/src/.clang-tidy
blob: d70bcaf6063f6e9f0e1c81866dfdbcbd8f5774ea (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This .clang-tidy file is used by CI to ensure that commits do not worsen the
# codebase. The checks and values below are the minimum standard for new code.
# (Without claiming that they are 100% correct. They can be modified on demand!)
# If you want to improve the codebase try enabling some additional checks or
# playing with the configuration values.
#
# Some checks are highly style dependent. The goal is NOT to activate all of
# them.

---
Checks: '
  -*,
  bugprone-*,
  -bugprone-branch-clone,
  -bugprone-narrowing-conversions,
  -bugprone-signed-char-misuse,
  cert-*,
  -cert-dcl50-cpp,
  -cert-dcl58-cpp,
  -cert-err34-c,
  -cert-err58-cpp,
  clang-analyzer-*,
  -clang-analyzer-alpha*,
  -clang-analyzer-optin.performance.Padding,
  -clang-analyzer-valist.Uninitialized,
  clang-diagnostic-*,
  cppcoreguidelines-*,
  -cppcoreguidelines-avoid-c-arrays,
  -cppcoreguidelines-avoid-magic-numbers,
  -cppcoreguidelines-avoid-non-const-global-variables,
  -cppcoreguidelines-const-correctness,
  -cppcoreguidelines-init-variables,
  -cppcoreguidelines-macro-usage,
  -cppcoreguidelines-narrowing-conversions,
  -cppcoreguidelines-no-malloc,
  -cppcoreguidelines-non-private-member-variables-in-classes,
  -cppcoreguidelines-owning-memory,
  -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
  -cppcoreguidelines-pro-bounds-constant-array-index,
  -cppcoreguidelines-pro-bounds-pointer-arithmetic,
  -cppcoreguidelines-pro-type-const-cast,
  -cppcoreguidelines-pro-type-member-init,
  -cppcoreguidelines-pro-type-reinterpret-cast,
  -cppcoreguidelines-pro-type-union-access,
  -cppcoreguidelines-pro-type-vararg,
  -cppcoreguidelines-special-member-functions,
  modernize-*,
  -modernize-avoid-c-arrays,
  -modernize-pass-by-value,
  -modernize-return-braced-init-list,
  -modernize-use-auto,
  -modernize-use-default-member-init,
  -modernize-use-nodiscard,
  -modernize-use-trailing-return-type,
  performance-*,
  -performance-unnecessary-value-param,
  readability-*,
  -readability-convert-member-functions-to-static,
  -readability-else-after-return,
  -readability-function-cognitive-complexity,
  -readability-implicit-bool-conversion,
  -readability-magic-numbers,
  -readability-named-parameter,
  -readability-qualified-auto,
  -readability-redundant-declaration,
  '
WarningsAsErrors: '*'
# Only include headers directly in src.
HeaderFilterRegex: 'src/[^/]*$'
CheckOptions:
  # Always add braces (added here just in case Clang-Tidy default changes).
  - key:             readability-braces-around-statements.ShortStatementLines
    value:           0

  # If you hit a limit, please consider changing the code instead of the limit.
  - key:             readability-function-size.LineThreshold
    value:           999999
  - key:             readability-function-size.StatementThreshold
    value:           999999
  - key:             readability-function-size.BranchThreshold
    value:           999999
  - key:             readability-function-size.ParameterThreshold
    value:           7
  - key:             readability-function-size.NestingThreshold
    value:           999999
  - key:             readability-function-size.VariableThreshold
    value:           80
...