-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
232 lines (211 loc) · 8.36 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
Checks: "bugprone-*,\
cert-*,\
clang-analyzer-*,\
cppcoreguidelines-*,\
hicpp-*,\
misc-*,\
modernize-*,\
-modernize-use-trailing-return-type,\
mpi-*,\
performance-*,\
portability-*,\
readability-*"
CheckOptions:
# ============================================================================
# Settings for readability-* Check
# ============================================================================
# ----------------------------------------------------------------------------
# Declarations
# ----------------------------------------------------------------------------
- key: readability-redundant-declaration.IgnoreMacros
value: 1
# ----------------------------------------------------------------------------
# Braces
# ----------------------------------------------------------------------------
- key: readability-braces-around-statements.ShortStatementLines
value: 0
# ----------------------------------------------------------------------------
# Control Flow
# ----------------------------------------------------------------------------
- key: readability-else-after-return.WarnOnUnfixable
value: true
- key: readability-else-after-return.WarnOnConditionVariables
value: true
- key: readability-qualified-auto.AddConstToQualified
value: 1
# ----------------------------------------------------------------------------
# Functions
# ----------------------------------------------------------------------------
- key: readability-function-size.LineThreshold
value: 25
- key: readability-function-size.StatementThreshold
value: 25
- key: readability-function-size.ParameterThreshold
value: 3
- key: readability-function-size.BranchThreshold
value: 5
- key: readability-function-size.NestingThreshold
value: 3
- key: readability-function-size.VariableThreshold
value: 5
- key: readability-inconsistent-declaration-paramter-name.Strict
value: 1
# ----------------------------------------------------------------------------
# Boolean Expressions
# ----------------------------------------------------------------------------
- key: readability-simplifie-boolean-expr.ChainedConditionalReturn
value: 1
- key: readability-simplifie-boolean-expr.ChainedConditionalAssignment
value: 1
# ----------------------------------------------------------------------------
# Implicit Conversions
# ----------------------------------------------------------------------------
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: 0
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: 0
# ----------------------------------------------------------------------------
# Magic Numbers
# ----------------------------------------------------------------------------
# - key: readability-magic-numbers.IgnoredIntegerValues
# value: 1;2;3;4
- key: IgnorePowersOf2IntegerValues
value: false
# - key: IgnoredFloatingPointValues
# value: 1.0;100.0
# ----------------------------------------------------------------------------
# Classes
# ----------------------------------------------------------------------------
- key: readability-redundant-access-specifiers.CheckFirstDeclaration
value: 1
# ----------------------------------------------------------------------------
# Naming Conventions
# ----------------------------------------------------------------------------
# The settings here are more explicit than they need be. This will make it
# easier to tweak for other projects.
#
# The following cases are available:
# * lower_case
# * UPPER_CASE
# * camelBack
# * CamelCase
# * camel_Snake_Back
# * Camel_Snake_Case
# * aNy_CasE
#
# Each setting has three options that can be set:
# * <Setting>Prefix
# * <Setting>Case
# * <Setting>Postfix
- key: readability-identifier-naming.AggressiveDependentMemberLookup
value: 1
# ======================== Classes, Unions and Structs =======================
# Class Names
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.AbstractClassCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
# Class Members
- key: readability-identifier-naming.ClassConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
- key: readability-identifier-naming.PublicMemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberCase
value: lower_case
- key: readability-identifier-naming.ProtectedMemberCase
value: lower_case
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.ConstantMemberCase
value: UPPER_CASE
# Methods
- key: readability-identifier-naming.MethodCase
value: camelBack
- key: readability-identifier-naming.VirtualMethodCase
value: camelBack
- key: readability-identifier-naming.PrivateMethodCase
value: camelBack
- key: readability-identifier-naming.PublicMethodCase
value: camelBack
- key: readability-identifier-naming.ProtectedMethodCase
value: camelBack
- key: readability-identifier-naming.ConstexprMethodCase
value: camelBack
- key: readability-identifier-naming.ClassMethodCase
value: camelBack
# ================================= Functions ================================
# Function Names
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.ConstexprFunctionCase
value: camelBack
- key: readability-identifier-naming.GlobalFunctionCase
value: camelBack
# Parameters
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.ConstantParameterCase
value: lower_case
- key: readability-identifier-naming.PointerParameterCase
value: lower_case
# ================================ Variables =================================
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.StaticVariableCase
value: lower_case
- key: readability-identifier-naming.GlobalPointerCase
value: lower_case
- key: readability-identifier-naming.LocalPointerCase
value: lower_case
- key: readability-identifier-naming.GlobalVariableCase
value: lower_case
# ================================ Constants =================================
- key: readability-identifier-naming.ConstexprVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.LocalConstantCase
value: lower_case
- key: readability-identifier-naming.LocalConstantPointerCase
value: lower_case
- key: readability-identifier-naming.GlobalConstantPointerCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
# =============================== Enumerations ===============================
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
# ================================ Namespaces ================================
- key: readability-identifier-naming.InlineNamespaceCase
value: lower_case
- key: readability-identifier-naming.NamespaceCase
value: lower_case
# ================================ Templates =================================
- key: readability-identifier-naming.ParamterPackCase
value: CamelCase
- key: readability-identifier-naming.TemplateParameterCase
value: UPPER_CASE
- key: readability-identifier-naming.TemplateTemplateParameterCase
value: lower_case
- key: readability-identifier-naming.TypeTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.ValueTemplateParameterCase
value: lower_case
# ================================= Aliases ==================================
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: CamelCase
# ================================== Macros ==================================
- key: MacroDefinitionCase
value: UPPER_CASE