-
Notifications
You must be signed in to change notification settings - Fork 7
/
.clang-tidy
109 lines (105 loc) · 3.68 KB
/
.clang-tidy
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Checks: '-*,
clang-diagnostic-*,
performance-*,
performance-inefficient-vector-operation,
cert-*,
portability-restrict-system-includes,
modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-return-braced-init-list,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-equals-default,
modernize-use-emplace,
modernize-use-equals-delete,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
modernize-use-using,
google-explicit-constructor,
google-build-using-namespace,
google-runtime-int,
misc-definitions-in-headers,
-bugprone-macro-parentheses,
readability-braces-around-statements,
-bugprone-branch-clone,
readability-identifier-naming,
hicpp-exception-baseclass,
misc-throw-by-value-catch-by-reference,
-bugprone-signed-char-misuse,
-bugprone-misplaced-widening-cast,
-bugprone-sizeof-expression,
-bugprone-narrowing-conversions,
google-global-names-in-headers,
llvm-header-guard,
misc-definitions-in-headers,
readability-container-size-empty,
clang-analyzer-core.NonNullParamChecker,
clang-analyzer-core.BitwiseShift,
'
WarningsAsErrors: '*'
AnalyzeTemporaryDtors: false
FormatStyle: none
ExtraArgs:
# clang-tidy 17 started to complain (for unknown reasons) that various pragmas are unknown ("clang-diagnostic-unknown-pragmas").
# This is technically a compiler error, not a clang-tidy error. We could litter the code base with more pragmas that suppress
# this error but it is better to pass the following flag to the compiler:
- '-Wno-unknown-pragmas'
- '-Wno-unused-command-line-argument' # similar issue
CheckOptions:
# https://stackoverflow.com/questions/68475958/clang-tidy-emits-warning-when-compiling-with-c20-enabled
- key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp
value: expr-type
- key: readability-identifier-naming.ClassCase
value: aNy_CasE
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.TypedefSuffix
value: _t
- key: readability-identifier-naming.FunctionCase
value: aNy_CasE
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.ConstantCase
value: aNy_CasE
- key: readability-identifier-naming.ConstantParameterCase
value: lower_case
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ConstantMemberCase
value: aNy_CasE
- key: readability-identifier-naming.StaticVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.ClassConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ConstexprVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.TemplateTemplateParameterCase
value: UPPER_CASE
- key: readability-identifier-naming.TypeTemplateParameterCase
value: UPPER_CASE
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberPrefix
value: "m_"
- key: readability-identifier-naming.PrivateMethodCase
value: lower_case