forked from eclipse-score/communication
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-tidy
More file actions
286 lines (281 loc) · 10.5 KB
/
.clang-tidy
File metadata and controls
286 lines (281 loc) · 10.5 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
---
# Clang-tidy configuration for SCORE Communication project
Checks: >
-*,
# --- autosar-severity-one ---
bugprone-use-after-move,
bugprone-dynamic-static-initializers,
bugprone-suspicious-enum-usage,
cert-oop54-cpp,
clang-analyzer-core.uninitialized.ArraySubscript,
clang-analyzer-core.uninitialized.Assign,
clang-analyzer-core.uninitialized.Branch,
clang-analyzer-core.uninitialized.CapturedBlockVariable,
clang-analyzer-core.uninitialized.UndefReturn,
clang-analyzer-optin.cplusplus.UninitializedObject,
clang-analyzer-security.FloatLoopCounter,
clang-analyzer-valist.Uninitialized,
cppcoreguidelines-avoid-goto,
cppcoreguidelines-init-variables,
cppcoreguidelines-no-malloc,
cppcoreguidelines-pro-bounds-constant-array-index,
cppcoreguidelines-pro-bounds-pointer-arithmetic,
cppcoreguidelines-pro-type-cstyle-cast,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-pro-type-reinterpret-cast,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-pro-type-union-access,
cppcoreguidelines-virtual-class-destructor,
google-default-arguments,
google-explicit-constructor,
hicpp-no-array-decay,
hicpp-no-assembler,
misc-definitions-in-headers,
misc-unconventional-assign-operator,
misc-unused-parameters,
modernize-avoid-c-arrays,
modernize-deprecated-headers,
modernize-make-shared,
modernize-use-auto,
modernize-use-equals-default,
performance-noexcept-move-constructor,
readability-inconsistent-declaration-parameter-name,
readability-misplaced-array-index,
readability-redundant-declaration,
# --- autosar-severity-two ---
bugprone-forwarding-reference-overload,
bugprone-move-forwarding-reference,
bugprone-multiple-statement-macro,
cert-dcl58-cpp,
clang-analyzer-deadcode.DeadStores,
clang-analyzer-nullability.NullablePassedToNonnull,
clang-analyzer-security.insecureAPI.rand,
cppcoreguidelines-narrowing-conversions,
cppcoreguidelines-pro-bounds-array-to-pointer-decay,
cppcoreguidelines-pro-type-vararg,
cppcoreguidelines-special-member-functions,
fuchsia-multiple-inheritance,
google-build-using-namespace,
hicpp-move-const-arg,
hicpp-signed-bitwise,
hicpp-use-nullptr,
misc-no-recursion,
modernize-use-noexcept,
modernize-use-using,
readability-braces-around-statements,
readability-implicit-bool-conversion,
readability-isolate-declaration,
readability-redundant-control-flow,
# --- cert ---
cert-err52-cpp,
clang-analyzer-alpha.security.ArrayBoundV2,
clang-analyzer-core.UndefinedBinaryOperatorResult,
clang-analyzer-cplusplus.NewDelete,
# --- qnx-checks ---
bugprone-reserved-identifier,
# --- extra ---
bugprone-assert-side-effect,
bugprone-copy-constructor-init,
bugprone-dangling-handle,
bugprone-suspicious-stringview-data-usage,
misc-include-cleaner,
misc-use-anonymous-namespace,
misc-use-internal-linkage,
modernize-avoid-bind,
modernize-concat-nested-namespaces,
modernize-loop-convert,
modernize-make-unique,
modernize-min-max-use-initializer-list,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-return-braced-init-list,
modernize-shrink-to-fit,
modernize-type-traits,
modernize-unary-static-assert,
modernize-use-bool-literals,
modernize-use-emplace,
modernize-use-equals-delete,
modernize-use-integer-sign-comparison,
modernize-use-nodiscard,
modernize-use-nullptr,
modernize-use-transparent-functors,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-string-concatenation,
performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-no-automatic-move,
performance-no-int-to-ptr,
performance-noexcept-swap,
performance-trivially-destructible,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
readability-container-data-pointer,
readability-else-after-return,
readability-magic-numbers,
readability-math-missing-parentheses,
readability-redundant-casting,
readability-redundant-inline-specifier,
readability-simplify-boolean-expr,
readability-use-anyofallof,
readability-use-std-min-max,
# --- style-readability ---
misc-confusable-identifiers,
misc-misleading-bidirectional,
misc-misleading-identifier,
misc-uniqueptr-reset-release,
misc-unused-alias-decls,
misc-unused-using-decls,
readability-avoid-nested-conditional-operator,
readability-avoid-return-with-void-value,
readability-const-return-type,
readability-container-size-empty,
readability-delete-null-pointer,
readability-enum-initial-value,
readability-make-member-function-const,
readability-misleading-indentation,
readability-non-const-parameter,
readability-qualified-auto,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-redundant-string-init,
readability-reference-to-constructed-temporary,
readability-simplify-subscript-expr,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
readability-uppercase-literal-suffix,
WarningsAsErrors: >
clang-analyzer-*,
HeaderFilterRegex: '^(?!.*/third_party/).*'
FormatStyle: file
CheckOptions:
- key: readability-inconsistent-declaration-parameter-name.Strict
value: true
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: true
- key: hicpp-move-const-arg.CheckTriviallyCopyableMove
value: false
- key: modernize-avoid-c-arrays.AllowStringArrays
value: false
- key: modernize-make-shared.IncludeStyle
value: "llvm"
- key: modernize-use-auto.RemoveStars
value: false
- key: readability-braces-around-statements.ShortStatementLines
value: 0
- key: bugprone-assert-side-effect.AssertMacros
value: "assert,SCORE_LANGUAGE_FUTURECPP_ASSERT,SCORE_LANGUAGE_FUTURECPP_ASSERT_DBG,SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD,SCORE_LANGUAGE_FUTURECPP_ASSERT_MESSAGE,SCORE_LANGUAGE_FUTURECPP_ASSERT_DBG_MESSAGE,SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD_MESSAGE,SCORE_LANGUAGE_FUTURECPP_PRECONDITION,SCORE_LANGUAGE_FUTURECPP_PRECONDITION_DBG,SCORE_LANGUAGE_FUTURECPP_PRECONDITION_PRD,SCORE_LANGUAGE_FUTURECPP_PRECONDITION_MESSAGE,SCORE_LANGUAGE_FUTURECPP_PRECONDITION_DBG_MESSAGE,SCORE_LANGUAGE_FUTURECPP_PRECONDITION_PRD_MESSAGE"
- key: bugprone-assert-side-effect.CheckFunctionCalls
value: true
- key: bugprone-dangling-handle.HandleClasses
value: >
::score::cpp::basic_string_view;
::score::cpp::span;
::score::safecpp::basic_zstring_view;
::std::basic_string_view;
::std::span
- key: bugprone-suspicious-stringview-data-usage.AllowedCallees
value: ""
- key: bugprone-suspicious-stringview-data-usage.StringViewTypes
value: >
::score::cpp::basic_string_view;
::std::basic_string_view
- key: modernize-loop-convert.UseCxx20ReverseRanges
value: false
- key: modernize-loop-convert.IncludeStyle
value: "llvm"
- key: modernize-make-unique.IncludeStyle
value: "llvm"
- key: modernize-min-max-use-initializer-list.IncludeStyle
value: "llvm"
- key: modernize-pass-by-value.IncludeStyle
value: "llvm"
- key: modernize-use-emplace.ContainersWithPushBack
value: "::score::cpp::inplace_vector;::score::cpp::pmr::deque;::score::cpp::pmr::list;::score::cpp::pmr::vector;::std::vector;::std::list;::std::deque"
- key: modernize-use-emplace.IgnoreImplicitConstructors
value: false
- key: modernize-use-emplace.SmartPointers
value: "::score::cpp::pmr::unique_ptr;::std::shared_ptr;::std::unique_ptr;::std::weak_ptr"
- key: modernize-use-emplace.TupleTypes
value: "::std::pair;::std::tuple"
- key: modernize-use-emplace.TupleMakeFunctions
value: "::std::make_pair;::std::make_tuple"
- key: modernize-use-integer-sign-comparison.IncludeStyle
value: "llvm"
- key: modernize-use-nodiscard.ReplacementString
value: "[[nodiscard]]"
- key: modernize-use-transparent-functors.SafeMode
value: true
- key: performance-faster-string-find.StringLikeClasses
value: >
::score::cpp::basic_string_view;
::score::safecpp::basic_zstring_view;
::score::cpp::pmr::basic_string;
::std::basic_string_view;
::std::basic_string
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: true
- key: performance-move-const-arg.CheckMoveToConstRef
value: true
- key: performance-unnecessary-value-param.IncludeStyle
value: "llvm"
- key: readability-container-data-pointer.IgnoredContainers
value: ""
- key: readability-redundant-casting.IgnoreTypeAliases
value: true
- key: readability-redundant-inline-specifier.StrictMode
value: true
- key: misc-uniqueptr-reset-release.IncludeStyle
value: "llvm"
- key: readability-avoid-return-with-void-value.StrictMode
value: true
- key: readability-enum-initial-value.AllowExplicitZeroFirstInitialValue
value: true
- key: readability-enum-initial-value.AllowExplicitSequentialInitialValues
value: true
- key: readability-qualified-auto.AddConstToQualified
value: true
- key: readability-redundant-string-init.StringNames
value: >
::score::cpp::basic_string_view;
::score::cpp::pmr::basic_string;
::score::safecpp::basic_zstring_view;
::std::basic_string_view;
::std::basic_string
- key: readability-simplify-subscript-expr.Types
value: >
::score::cpp::basic_string_view;
::score::cpp::pmr::basic_string;
::score::cpp::pmr::vector;
::score::cpp::span;
::score::safecpp::basic_zstring_view;
::std::array;
::std::basic_string_view;
::std::basic_string;
::std::vector;
::std::span
- key: readability-string-compare.StringLikeClasses
value: >
::score::cpp::basic_string_view;
::score::safecpp::basic_zstring_view;
::std::basic_string_view;
::std::basic_string
- key: readability-uniqueptr-delete-release.PreferResetCall
value: true