forked from Xilinx/inference-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-tidy
217 lines (215 loc) · 7.75 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
# Copyright 2021 Xilinx, Inc.
# Copyright 2022 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
Checks: >
*,
-altera-*,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-reinterpret-cast,
-fuchsia-*,
-google-runtime-references,
-hicpp-no-array-decay,
-hicpp-signed-bitwise,
-llvm-header-guard,
-llvm-include-order,
-llvmlibc-*,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,
-modernize-use-trailing-return-type
#
# Disabled checks:
#
# altera-*
# These guidelines are particular to altera and unnecessary here
#
# cppcoreguidelines-non-private-member-variables-in-classes
# We allow protected member variables in virtual classes.
#
# cppcoreguidelines-pro-bounds-array-to-pointer-decay
# This gets triggered on using assert() in clang-tidy-10
#
# cppcoreguidelines-pro-bounds-pointer-arithmetic
# We use pointer math to get at underlying buffer data
#
# cppcoreguidelines-pro-type-reinterpret-cast
# Sometimes used in type-invariant buffer data
#
# fuchsia-*
# These guidelines are particular to Fuchsia and unnecessary here
#
# google-runtime-references
# Flags non-const reference parameters but this is fine (assume caller modifies)
#
# hicpp-no-array-decay
# Alias for cppcoreguidelines-pro-bounds-array-to-pointer-decay
#
# hicpp-signed-bitwise
# This check is needlessly pedantic (https://bugs.llvm.org/show_bug.cgi?id=36961#c9)
#
# llvm-header-guard
# Doesn't seem to be satisfied easily
#
# llvm-include-order
# clang-format takes care of the include order
#
# llvmlibc-*
# These guidelines are particular to llvm-libc and unnecessary here
#
# misc-non-private-member-variables-in-classes
# Alias for cppcoreguidelines-non-private-member-variables-in-classes
#
# misc-unused-parameters
# This gets triggered too often on virtual functions that are unimplemented
#
# modernize-use-trailing-return-type
# Not using trailing type syntax here
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: google
CheckOptions:
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: '1'
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: '1'
- key: hicpp-member-init.IgnoreArrays
value: '1'
- key: hicpp-special-member-functions.AllowSoleDefaultDtor
value: '1'
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'
- key: readability-identifier-naming.AbstractClassCase
value: CamelCase
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassConstantCase
value: lower_case
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
- key: readability-identifier-naming.ClassMemberSuffix
value: _
- key: readability-identifier-naming.ClassMethodCase
value: camelBack
- key: readability-identifier-naming.ConstantCase
value: lower_case
- key: readability-identifier-naming.ConstantMemberCase
value: lower_case
- key: readability-identifier-naming.ConstantParameterCase
value: lower_case
- key: readability-identifier-naming.ConstantPointerParameterCase
value: lower_case
- key: readability-identifier-naming.ConstexprFunctionCase
value: camelBack
- key: readability-identifier-naming.ConstexprMethodCase
value: camelBack
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.GlobalConstantPointerCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPointerPrefix
value: k
- key: readability-identifier-naming.GlobalFunctionCase
value: camelBack
- key: readability-identifier-naming.GlobalPointerCase
value: lower_case
- key: readability-identifier-naming.GlobalVariableCase
value: lower_case
- key: readability-identifier-naming.InlineNamespaceCase
value: lower_case
- key: readability-identifier-naming.LocalConstantCase
value: lower_case
- key: readability-identifier-naming.LocalConstantPointerCase
value: lower_case
- key: readability-identifier-naming.LocalPointerCase
value: lower_case
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.MemberSuffix
value: _
- key: readability-identifier-naming.MethodCase
value: camelBack
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.ParameterPackCase
value: lower_case
- key: readability-identifier-naming.PointerParameterCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.PrivateMethodCase
value: camelBack
- key: readability-identifier-naming.ProtectedMemberCase
value: lower_case
- key: readability-identifier-naming.ProtectedMemberSuffix
value: _
- key: readability-identifier-naming.ProtectedMethodCase
value: camelBack
- key: readability-identifier-naming.PublicMemberCase
value: lower_case
- key: readability-identifier-naming.PublicMethodCase
value: camelBack
- key: readability-identifier-naming.ScopedEnumConstantCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantPrefix
value: k
- key: readability-identifier-naming.StaticVariableCase
value: lower_case
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.TemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.TemplateTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: CamelCase
- key: readability-identifier-naming.TypeTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.ValueTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.ValueTemplateParameterPrefix
value: k
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.VirtualMethodCase
value: camelBack
...