-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
cppcheckpremium-suppressions
267 lines (182 loc) · 7.13 KB
/
cppcheckpremium-suppressions
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
# open source warnings are handled by the selfcheck.yml
noExplicitConstructor
postfixOperator
shadowFunction
useStlAlgorithm
normalCheckLevelMaxBranches
###########################################################################################################################
# Cert C++
###########################################################################################################################
# False positives for (a?b:c)&=true;
premium-cert-exp35-c
# False positives for initializations
premium-cert-exp45-c
# False positives when casting to uintptr
premium-cert-int36-c
# too picky
premium-cert-arr30-c
premium-cert-int32-c
premium-cert-str34-c
# we intentionally pass structs
premium-cert-dcl39-c-*
# we need to declare reserved identifier _CRTDBG_MAP_ALLOC
premium-cert-dcl51-cpp
# we don't want to check the return values of fclose/sprintf/etc
premium-cert-err33-c
# TODO: Is there unsafe allocations, in case of exceptions) in cppcheck
# we have global objects
premium-cert-err58-cpp
# TODO: Exception objects must be nothrow copy constructible.
premium-cert-err60-cpp
# TODO should we throw Token?
premium-cert-err61-cpp
# TODO: Detect errors when converting a string to a number. The library function 'atoi()' shall not be used.
premium-cert-err62-cpp
# TODO: Can we reduce some const_cast?
premium-cert-exp55-cpp
###########################################################################################################################
# Misra C++ 2023
###########################################################################################################################
# There are false positives
premium-misra-cpp-2023-6.5.1:lib/symboldatabase.cpp
premium-misra-cpp-2023-6.7.2
premium-misra-cpp-2023-8.18.2
# False positives: #13004
premium-misra-cpp-2023-8.2.7:lib/valueflow.cpp
premium-misra-cpp-2023-8.2.7:lib/checkclass.cpp
# ignored function return value (emplace etc)
premium-misra-cpp-2023-0.1.2
# TODO use named function arguments
premium-misra-cpp-2023-0.2.2
# we comment out code by intention in some cases
premium-misra-cpp-2023-5.7.2
# TODO should we use this rule?
premium-misra-cpp-2023-5.10.1
# we use octal by intention in lib/color.cpp
premium-misra-cpp-2023-5.13.2:lib/color.cpp
# we intentionally write numeric constants without suffixes
premium-misra-cpp-2023-5.13.4
# we declare variables, functions, etc in global namespace by intention
premium-misra-cpp-2023-6.0.3
# TODO use inline for template functions?
premium-misra-cpp-2023-6.2.4
# TODO ensure we don't conceal methods in derived classes
premium-misra-cpp-2023-6.4.2
# Internal linkage using "static" keyword
premium-misra-cpp-2023-6.5.2
# we use local static variables by intention
premium-misra-cpp-2023-6.7.1
# Could write good warnings but also has a warning about safe code
premium-misra-cpp-2023-6.8.3
# FIXME enforce proper ref qualifications
premium-misra-cpp-2023-6.8.4
# We intentionally use the standard integer types
premium-misra-cpp-2023-6.9.2
# we have conversion from bool to int by intention
premium-misra-cpp-2023-7.0.1
# we convert integer to bool by intention
premium-misra-cpp-2023-7.0.2
# Misra C++ is too pedantic about using character values
premium-misra-cpp-2023-7.0.3
# signed integer expression in bitwise rhs by intention
premium-misra-cpp-2023-7.0.4
# sign conversions in assignments by intention
premium-misra-cpp-2023-7.0.6
# we intentionally have array-to-pointer decay in some function calls
premium-misra-cpp-2023-7.11.2
# warns when we use callbacks
premium-misra-cpp-2023-7.11.3
# too picky about operator precedence.
premium-misra-cpp-2023-8.0.1
# TODO review lambda captures
premium-misra-cpp-2023-8.1.1
# TODO should we use this rule?
premium-misra-cpp-2023-8.1.2
# TODO use strchr instead of memchr?
premium-misra-cpp-2023-8.2.6
# intentional pointer to int conversion in lib/utils.h to output dump files
premium-misra-cpp-2023-8.2.7:lib/utils.h
# TODO check ellipsis usage
premium-misra-cpp-2023-8.2.11
# we call functions etc by intention in && || RHS
premium-misra-cpp-2023-8.14.1
# we use c-style casts by intention
premium-misra-cpp-2023-8.2.2
# we use const_cast by intention
premium-misra-cpp-2023-8.2.3
# we use recursion by intention
premium-misra-cpp-2023-8.2.10
# we separate variable declarations by intention with comma
premium-misra-cpp-2023-8.19.1
# we leave out {} sometimes
premium-misra-cpp-2023-9.3.1
# we leave out "else" by intention
premium-misra-cpp-2023-9.4.1
# looping through linked lists by intention
premium-misra-cpp-2023-9.5.1
# I believe it warns in some cases where we don't have UB
premium-misra-cpp-2023-9.5.2
# cppcheck does not understand that __builtin_unreachable() is noreturn
premium-misra-cpp-2023-9.6.4:lib/utils.h
# we declare multiple variables by intention
premium-misra-cpp-2023-10.0.1
# we do not define enum type explicitly by intention
premium-misra-cpp-2023-10.2.1
# TODO we have unscoped enums
premium-misra-cpp-2023-10.2.2
# we use arrays by intention
premium-misra-cpp-2023-11.3.1
# we dont initialize variables directly by intention
premium-misra-cpp-2023-11.6.1
# we have enums where only last constant is initialized by intention
premium-misra-cpp-2023-11.6.3
# we use unions by intention
premium-misra-cpp-2023-12.3.1
# TODO ensure overrides match
premium-misra-cpp-2023-13.3.2
# TODO use the same parameter names in overriden methods.
premium-misra-cpp-2023-13.3.3
# we sometimes use both public/private data members by intention
premium-misra-cpp-2023-14.1.1
# TODO should we use this rule?
premium-misra-cpp-2023-15.0.1
# seems too picky (explicitly calling InferModel and Analyzer base class constructors even though they are defaulted).
premium-misra-cpp-2023-15.1.2
# TODO use explicit for conversion operator
premium-misra-cpp-2023-15.1.3
# TODO: should we use this rule?
premium-misra-cpp-2023-16.6.1
# TODO: should we use this rule?
premium-misra-cpp-2023-17.8.1
# TODO: should we throw token pointers?
premium-misra-cpp-2023-18.1.1
# TODO do not throw token pointer?
premium-misra-cpp-2023-18.3.2:lib/tokenize.cpp
# in smallvector we intentionally put a constant above some preprocessor includes
premium-misra-cpp-2023-19.0.3:lib/smallvector.h
# code is intentional, should cppcheck premium understand __has_cpp_attribute and compiler defines better?
premium-misra-cpp-2023-19.1.3:lib/config.h
# we use #/## by intention in some cases
premium-misra-cpp-2023-19.3.1
# We use #pragma by intention
premium-misra-cpp-2023-19.6.1
# We use atoi by intention
premium-misra-cpp-2023-21.2.1
# We use <cstring> functions by intention
premium-misra-cpp-2023-21.2.2
# We have limited use of std::getenv by intention
premium-misra-cpp-2023-21.2.3
# Dynamic memory usage in std::string etc
premium-misra-cpp-2023-21.6.1
# We use new/delete by intention sometimes
premium-misra-cpp-2023-21.6.2
# TODO use std::make_unique when we require C++14
premium-misra-cpp-2023-23.11.1
# we use <cctype> by intention
premium-misra-cpp-2023-24.5.1
# we use std::vector<bool> by intention in lib/infer.cpp but in general it should be avoided
premium-misra-cpp-2023-26.3.1:lib/infer.cpp
# TODO review that std::move is used properly
premium-misra-cpp-2023-28.6.1
# we use cstdio by intention
premium-misra-cpp-2023-30.0.1