@codacy/tools-cppcheck-2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +74 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3694 -0
- package/package.json +32 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3694 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
default: () => index_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
var import_tooling2 = require("@codacy/tooling");
|
|
37
|
+
|
|
38
|
+
// src/adapter.ts
|
|
39
|
+
var import_tooling = require("@codacy/tooling");
|
|
40
|
+
var import_fast_xml_parser = require("fast-xml-parser");
|
|
41
|
+
var import_path = __toESM(require("path"));
|
|
42
|
+
var import_promises = __toESM(require("fs/promises"));
|
|
43
|
+
|
|
44
|
+
// src/patterns.json
|
|
45
|
+
var patterns_default = [
|
|
46
|
+
{
|
|
47
|
+
id: "cppcheck_accessForwarded",
|
|
48
|
+
category: "ErrorProne",
|
|
49
|
+
severityLevel: "High",
|
|
50
|
+
title: "Avoid Accessing Moved Variable",
|
|
51
|
+
enabled: false,
|
|
52
|
+
parameters: []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "cppcheck_accessMoved",
|
|
56
|
+
category: "ErrorProne",
|
|
57
|
+
severityLevel: "High",
|
|
58
|
+
title: "Avoid Accessing Moved Variable",
|
|
59
|
+
enabled: false,
|
|
60
|
+
parameters: []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "cppcheck_argumentSize",
|
|
64
|
+
category: "Security",
|
|
65
|
+
severityLevel: "Error",
|
|
66
|
+
title: "Avoid Buffer Size Mismatch in Function Arguments",
|
|
67
|
+
enabled: false,
|
|
68
|
+
parameters: []
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "cppcheck_arithOperationsOnVoidPointer",
|
|
72
|
+
category: "ErrorProne",
|
|
73
|
+
severityLevel: "High",
|
|
74
|
+
title: "Avoid Arithmetic Operations on Void Pointers",
|
|
75
|
+
enabled: true,
|
|
76
|
+
parameters: []
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "cppcheck_arrayIndexOutOfBounds",
|
|
80
|
+
category: "ErrorProne",
|
|
81
|
+
severityLevel: "Error",
|
|
82
|
+
title: "Avoid Array Index Out of Bounds Access",
|
|
83
|
+
enabled: true,
|
|
84
|
+
parameters: []
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "cppcheck_arrayIndexOutOfBoundsCond",
|
|
88
|
+
category: "ErrorProne",
|
|
89
|
+
severityLevel: "Error",
|
|
90
|
+
title: "Avoid Array Index Out of Bounds Access",
|
|
91
|
+
enabled: true,
|
|
92
|
+
parameters: []
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "cppcheck_arrayIndexThenCheck",
|
|
96
|
+
category: "ErrorProne",
|
|
97
|
+
severityLevel: "High",
|
|
98
|
+
title: "Avoid Using Array Index Before Bounds Check",
|
|
99
|
+
enabled: true,
|
|
100
|
+
parameters: []
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "cppcheck_assertWithSideEffect",
|
|
104
|
+
category: "ErrorProne",
|
|
105
|
+
severityLevel: "High",
|
|
106
|
+
title: "Avoid Side Effects in Assert Statements",
|
|
107
|
+
enabled: true,
|
|
108
|
+
parameters: []
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "cppcheck_assignBoolToFloat",
|
|
112
|
+
category: "ErrorProne",
|
|
113
|
+
severityLevel: "High",
|
|
114
|
+
title: "Avoid Assigning Boolean Values to Floating Point Variables",
|
|
115
|
+
enabled: false,
|
|
116
|
+
parameters: []
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "cppcheck_assignBoolToPointer",
|
|
120
|
+
category: "ErrorProne",
|
|
121
|
+
severityLevel: "High",
|
|
122
|
+
title: "Avoid Assigning Boolean Values to Pointer Variables",
|
|
123
|
+
enabled: true,
|
|
124
|
+
parameters: []
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "cppcheck_assignIfError",
|
|
128
|
+
category: "ErrorProne",
|
|
129
|
+
severityLevel: "High",
|
|
130
|
+
title: "Avoid Mismatching Assignment and Comparison Operators",
|
|
131
|
+
enabled: true,
|
|
132
|
+
parameters: []
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "cppcheck_AssignmentAddressToInteger",
|
|
136
|
+
category: "Compatibility",
|
|
137
|
+
severityLevel: "High",
|
|
138
|
+
title: "Avoid Assigning Pointer to Integer",
|
|
139
|
+
enabled: true,
|
|
140
|
+
parameters: []
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "cppcheck_assignmentInAssert",
|
|
144
|
+
category: "ErrorProne",
|
|
145
|
+
severityLevel: "High",
|
|
146
|
+
title: "Avoid Modifying Variables Inside Assert Statements",
|
|
147
|
+
enabled: true,
|
|
148
|
+
parameters: []
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "cppcheck_assignmentInCondition",
|
|
152
|
+
category: "ErrorProne",
|
|
153
|
+
severityLevel: "High",
|
|
154
|
+
title: "Avoid Assignment in Condition",
|
|
155
|
+
enabled: false,
|
|
156
|
+
parameters: []
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: "cppcheck_AssignmentIntegerToAddress",
|
|
160
|
+
category: "ErrorProne",
|
|
161
|
+
severityLevel: "High",
|
|
162
|
+
title: "Avoid Assigning Integers to Pointers",
|
|
163
|
+
enabled: true,
|
|
164
|
+
parameters: []
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "cppcheck_autoVariables",
|
|
168
|
+
category: "ErrorProne",
|
|
169
|
+
severityLevel: "High",
|
|
170
|
+
title: "Avoid Assigning Address of Local Auto-Variable to Function Parameter",
|
|
171
|
+
enabled: true,
|
|
172
|
+
parameters: []
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: "cppcheck_autovarInvalidDeallocation",
|
|
176
|
+
category: "ErrorProne",
|
|
177
|
+
severityLevel: "Error",
|
|
178
|
+
title: "Avoid Deallocation of Auto-Variables",
|
|
179
|
+
enabled: true,
|
|
180
|
+
parameters: []
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "cppcheck_badBitmaskCheck",
|
|
184
|
+
category: "ErrorProne",
|
|
185
|
+
severityLevel: "Warning",
|
|
186
|
+
title: "Avoid Using Bitwise OR '|' When One Operand Is Zero",
|
|
187
|
+
enabled: true,
|
|
188
|
+
parameters: []
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: "cppcheck_bitwiseOnBoolean",
|
|
192
|
+
category: "ErrorProne",
|
|
193
|
+
severityLevel: "High",
|
|
194
|
+
title: "Avoid Bitwise Operations on Boolean Expressions",
|
|
195
|
+
enabled: false,
|
|
196
|
+
parameters: []
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: "cppcheck_bufferAccessOutOfBounds",
|
|
200
|
+
category: "Security",
|
|
201
|
+
severityLevel: "Error",
|
|
202
|
+
title: "Avoid Buffer Access Out of Bounds",
|
|
203
|
+
enabled: true,
|
|
204
|
+
parameters: []
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: "cppcheck_CastAddressToIntegerAtReturn",
|
|
208
|
+
category: "Compatibility",
|
|
209
|
+
severityLevel: "High",
|
|
210
|
+
title: "Avoid Returning Address Values as Integers",
|
|
211
|
+
enabled: true,
|
|
212
|
+
parameters: []
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: "cppcheck_CastIntegerToAddressAtReturn",
|
|
216
|
+
category: "ErrorProne",
|
|
217
|
+
severityLevel: "High",
|
|
218
|
+
title: "Avoid Returning Integer in Function with Pointer Return Type",
|
|
219
|
+
enabled: true,
|
|
220
|
+
parameters: []
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: "cppcheck_catchExceptionByValue",
|
|
224
|
+
category: "ErrorProne",
|
|
225
|
+
severityLevel: "Warning",
|
|
226
|
+
title: "Catch Exception by Reference",
|
|
227
|
+
enabled: true,
|
|
228
|
+
parameters: []
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: "cppcheck_charBitOp",
|
|
232
|
+
category: "ErrorProne",
|
|
233
|
+
severityLevel: "High",
|
|
234
|
+
title: "Avoid Using 'char' Variables in Bitwise Operations",
|
|
235
|
+
enabled: true,
|
|
236
|
+
parameters: []
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: "cppcheck_charLiteralWithCharPtrCompare",
|
|
240
|
+
category: "ErrorProne",
|
|
241
|
+
severityLevel: "High",
|
|
242
|
+
title: "Avoid Comparing Char Literal with Char Pointer",
|
|
243
|
+
enabled: true,
|
|
244
|
+
parameters: []
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: "cppcheck_checkCastIntToCharAndBack",
|
|
248
|
+
category: "ErrorProne",
|
|
249
|
+
severityLevel: "High",
|
|
250
|
+
title: "Avoid Storing func_name() Return Value in char Variable When Comparing with EOF",
|
|
251
|
+
enabled: true,
|
|
252
|
+
parameters: []
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: "cppcheck_clarifyCalculation",
|
|
256
|
+
category: "CodeStyle",
|
|
257
|
+
severityLevel: "Info",
|
|
258
|
+
title: "Clarify Calculation Precedence for '+' and '?' Operators",
|
|
259
|
+
enabled: true,
|
|
260
|
+
parameters: []
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: "cppcheck_clarifyCondition",
|
|
264
|
+
category: "CodeStyle",
|
|
265
|
+
severityLevel: "Info",
|
|
266
|
+
title: "Clarify Suspicious Condition Combining Assignment and Comparison",
|
|
267
|
+
enabled: true,
|
|
268
|
+
parameters: []
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "cppcheck_clarifyStatement",
|
|
272
|
+
category: "ErrorProne",
|
|
273
|
+
severityLevel: "High",
|
|
274
|
+
title: "Clarify Pointer Increment Expression",
|
|
275
|
+
enabled: true,
|
|
276
|
+
parameters: []
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
id: "cppcheck_class_X_Y",
|
|
280
|
+
category: "ErrorProne",
|
|
281
|
+
severityLevel: "Warning",
|
|
282
|
+
title: "Handle Unrecognized Code with Include Directives",
|
|
283
|
+
enabled: false,
|
|
284
|
+
parameters: []
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: "cppcheck_commaSeparatedReturn",
|
|
288
|
+
category: "Comprehensibility",
|
|
289
|
+
severityLevel: "Info",
|
|
290
|
+
title: "Avoid Using Comma Operator in Return Statements",
|
|
291
|
+
enabled: true,
|
|
292
|
+
parameters: []
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
id: "cppcheck_compareBoolExpressionWithInt",
|
|
296
|
+
category: "ErrorProne",
|
|
297
|
+
severityLevel: "High",
|
|
298
|
+
title: "Avoid Comparison of Boolean Expressions with Non-Boolean Integers",
|
|
299
|
+
enabled: true,
|
|
300
|
+
parameters: []
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
id: "cppcheck_comparePointers",
|
|
304
|
+
category: "ErrorProne",
|
|
305
|
+
severityLevel: "High",
|
|
306
|
+
title: "Avoid Comparing Pointers That Point to Different Objects",
|
|
307
|
+
enabled: false,
|
|
308
|
+
parameters: []
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: "cppcheck_compareValueOutOfTypeRangeError",
|
|
312
|
+
category: "ErrorProne",
|
|
313
|
+
severityLevel: "High",
|
|
314
|
+
title: "Avoid Comparing Unsigned Char Against Out-of-Range Value",
|
|
315
|
+
enabled: false,
|
|
316
|
+
parameters: []
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
id: "cppcheck_comparisonError",
|
|
320
|
+
category: "ErrorProne",
|
|
321
|
+
severityLevel: "High",
|
|
322
|
+
title: "Avoid Always False Bitwise Comparison",
|
|
323
|
+
enabled: true,
|
|
324
|
+
parameters: []
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
id: "cppcheck_comparisonFunctionIsAlwaysTrueOrFalse",
|
|
328
|
+
category: "ErrorProne",
|
|
329
|
+
severityLevel: "Warning",
|
|
330
|
+
title: "Avoid Comparing a Variable to Itself with isless",
|
|
331
|
+
enabled: true,
|
|
332
|
+
parameters: []
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: "cppcheck_comparisonOfBoolWithBoolError",
|
|
336
|
+
category: "ErrorProne",
|
|
337
|
+
severityLevel: "High",
|
|
338
|
+
title: "Avoid Comparison of Boolean Variables Using Relational Operators",
|
|
339
|
+
enabled: true,
|
|
340
|
+
parameters: []
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
id: "cppcheck_comparisonOfBoolWithInvalidComparator",
|
|
344
|
+
category: "ErrorProne",
|
|
345
|
+
severityLevel: "High",
|
|
346
|
+
title: "Avoid Comparison of Boolean Values Using Relational Operators",
|
|
347
|
+
enabled: false,
|
|
348
|
+
parameters: []
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: "cppcheck_comparisonOfFuncReturningBoolError",
|
|
352
|
+
category: "ErrorProne",
|
|
353
|
+
severityLevel: "High",
|
|
354
|
+
title: "Avoid Comparison of Boolean-Returning Functions Using Relational Operators",
|
|
355
|
+
enabled: true,
|
|
356
|
+
parameters: []
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
id: "cppcheck_comparisonOfTwoFuncsReturningBoolError",
|
|
360
|
+
category: "ErrorProne",
|
|
361
|
+
severityLevel: "High",
|
|
362
|
+
title: "Avoid Comparison of Two Boolean-Returning Functions Using Relational Operators",
|
|
363
|
+
enabled: true,
|
|
364
|
+
parameters: []
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
id: "cppcheck_constParameter",
|
|
368
|
+
category: "BestPractice",
|
|
369
|
+
severityLevel: "Warning",
|
|
370
|
+
title: "Declare Parameter with const",
|
|
371
|
+
enabled: false,
|
|
372
|
+
parameters: []
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: "cppcheck_constParameterCallback",
|
|
376
|
+
category: "BestPractice",
|
|
377
|
+
severityLevel: "Info",
|
|
378
|
+
title: "Enforce const Declaration for Parameter When Possible",
|
|
379
|
+
enabled: false,
|
|
380
|
+
parameters: []
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
id: "cppcheck_constParameterPointer",
|
|
384
|
+
category: "BestPractice",
|
|
385
|
+
severityLevel: "Warning",
|
|
386
|
+
title: "Enforce const declaration for parameters when applicable",
|
|
387
|
+
enabled: false,
|
|
388
|
+
parameters: []
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
id: "cppcheck_constParameterReference",
|
|
392
|
+
category: "BestPractice",
|
|
393
|
+
severityLevel: "Info",
|
|
394
|
+
title: "Enforce const for parameters passed by reference",
|
|
395
|
+
enabled: false,
|
|
396
|
+
parameters: []
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
id: "cppcheck_constStatement",
|
|
400
|
+
category: "CodeStyle",
|
|
401
|
+
severityLevel: "Info",
|
|
402
|
+
title: "Avoid Redundant Constant Statements",
|
|
403
|
+
enabled: true,
|
|
404
|
+
parameters: []
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "cppcheck_constVariable",
|
|
408
|
+
category: "BestPractice",
|
|
409
|
+
severityLevel: "Warning",
|
|
410
|
+
title: "Enforce const Declaration for Variables",
|
|
411
|
+
enabled: false,
|
|
412
|
+
parameters: []
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
id: "cppcheck_constVariablePointer",
|
|
416
|
+
category: "BestPractice",
|
|
417
|
+
severityLevel: "Warning",
|
|
418
|
+
title: "Declare Variables as Const When Possible",
|
|
419
|
+
enabled: false,
|
|
420
|
+
parameters: []
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
id: "cppcheck_constVariableReference",
|
|
424
|
+
category: "BestPractice",
|
|
425
|
+
severityLevel: "Warning",
|
|
426
|
+
title: "Enforce Declaring Variables as Const When Possible",
|
|
427
|
+
enabled: false,
|
|
428
|
+
parameters: []
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: "cppcheck_containerOutOfBounds",
|
|
432
|
+
category: "ErrorProne",
|
|
433
|
+
severityLevel: "Error",
|
|
434
|
+
title: "Avoid Out of Bounds Access in Container Indexing",
|
|
435
|
+
enabled: false,
|
|
436
|
+
parameters: []
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
id: "cppcheck_copyCtorAndEqOperator",
|
|
440
|
+
category: "ErrorProne",
|
|
441
|
+
severityLevel: "High",
|
|
442
|
+
title: "Ensure Class Defines Both Copy Constructor and Assignment Operator",
|
|
443
|
+
enabled: false,
|
|
444
|
+
parameters: []
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
id: "cppcheck_copyCtorPointerCopying",
|
|
448
|
+
category: "ErrorProne",
|
|
449
|
+
severityLevel: "High",
|
|
450
|
+
title: "Avoid copying pointer values in copy constructor without allocating new memory",
|
|
451
|
+
enabled: true,
|
|
452
|
+
parameters: []
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
id: "cppcheck_coutCerrMisusage",
|
|
456
|
+
category: "ErrorProne",
|
|
457
|
+
severityLevel: "High",
|
|
458
|
+
title: "Avoid Invalid Usage of Output Stream '<< std::cout'",
|
|
459
|
+
enabled: true,
|
|
460
|
+
parameters: []
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
id: "cppcheck_cstyleCast",
|
|
464
|
+
category: "BestPractice",
|
|
465
|
+
severityLevel: "Warning",
|
|
466
|
+
title: "Avoid C-style Pointer Casting",
|
|
467
|
+
enabled: true,
|
|
468
|
+
parameters: []
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
id: "cppcheck_dangerousTypeCast",
|
|
472
|
+
category: "ErrorProne",
|
|
473
|
+
severityLevel: "High",
|
|
474
|
+
title: "Avoid Potentially Invalid Type Conversion in Old-Style C Casts",
|
|
475
|
+
enabled: false,
|
|
476
|
+
parameters: []
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
id: "cppcheck_danglingLifetime",
|
|
480
|
+
category: "ErrorProne",
|
|
481
|
+
severityLevel: "Error",
|
|
482
|
+
title: "Avoid Dangling Lifetime of Non-local Variable",
|
|
483
|
+
enabled: false,
|
|
484
|
+
parameters: []
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: "cppcheck_danglingReference",
|
|
488
|
+
category: "ErrorProne",
|
|
489
|
+
severityLevel: "Error",
|
|
490
|
+
title: "Avoid Non-Local Reference to Local Variable",
|
|
491
|
+
enabled: false,
|
|
492
|
+
parameters: []
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
id: "cppcheck_danglingTemporaryLifetime",
|
|
496
|
+
category: "ErrorProne",
|
|
497
|
+
severityLevel: "Error",
|
|
498
|
+
title: "Avoid Using Objects That Are Temporaries Beyond Their Lifetime",
|
|
499
|
+
enabled: false,
|
|
500
|
+
parameters: []
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
id: "cppcheck_danglingTempReference",
|
|
504
|
+
category: "ErrorProne",
|
|
505
|
+
severityLevel: "Error",
|
|
506
|
+
title: "Avoid Using References to Dangling Temporaries",
|
|
507
|
+
enabled: false,
|
|
508
|
+
parameters: []
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
id: "cppcheck_deallocret",
|
|
512
|
+
category: "ErrorProne",
|
|
513
|
+
severityLevel: "Error",
|
|
514
|
+
title: "Avoid Returning or Dereferencing Pointer After Deallocation",
|
|
515
|
+
enabled: true,
|
|
516
|
+
parameters: []
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
id: "cppcheck_deallocuse",
|
|
520
|
+
category: "ErrorProne",
|
|
521
|
+
severityLevel: "Error",
|
|
522
|
+
title: "Avoid Dereferencing Variables After Deallocation",
|
|
523
|
+
enabled: true,
|
|
524
|
+
parameters: []
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
id: "cppcheck_derefInvalidIterator",
|
|
528
|
+
category: "ErrorProne",
|
|
529
|
+
severityLevel: "Error",
|
|
530
|
+
title: "Avoid Dereferencing Invalid Iterators",
|
|
531
|
+
enabled: true,
|
|
532
|
+
parameters: []
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
id: "cppcheck_divideSizeof",
|
|
536
|
+
category: "ErrorProne",
|
|
537
|
+
severityLevel: "High",
|
|
538
|
+
title: "Avoid Division of Result of sizeof() on Pointer Type",
|
|
539
|
+
enabled: false,
|
|
540
|
+
parameters: []
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
id: "cppcheck_doubleFree",
|
|
544
|
+
category: "ErrorProne",
|
|
545
|
+
severityLevel: "Error",
|
|
546
|
+
title: "Avoid Double Free of Memory",
|
|
547
|
+
enabled: true,
|
|
548
|
+
parameters: []
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
id: "cppcheck_duplicateAssignExpression",
|
|
552
|
+
category: "ErrorProne",
|
|
553
|
+
severityLevel: "Warning",
|
|
554
|
+
title: "Avoid Duplicate Assignments of the Same Expression to Variables",
|
|
555
|
+
enabled: false,
|
|
556
|
+
parameters: []
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
id: "cppcheck_duplicateBranch",
|
|
560
|
+
category: "BestPractice",
|
|
561
|
+
severityLevel: "Warning",
|
|
562
|
+
title: "Avoid Duplicate Branches in If-Else Statements",
|
|
563
|
+
enabled: false,
|
|
564
|
+
parameters: []
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
id: "cppcheck_duplicateBreak",
|
|
568
|
+
category: "ErrorProne",
|
|
569
|
+
severityLevel: "Warning",
|
|
570
|
+
title: "Avoid Consecutive Return, Break, Continue, Goto, or Throw Statements",
|
|
571
|
+
enabled: true,
|
|
572
|
+
parameters: []
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
id: "cppcheck_duplicateCondition",
|
|
576
|
+
category: "CodeStyle",
|
|
577
|
+
severityLevel: "Info",
|
|
578
|
+
title: "Avoid Duplicate If Conditions",
|
|
579
|
+
enabled: false,
|
|
580
|
+
parameters: []
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
id: "cppcheck_duplicateConditionalAssign",
|
|
584
|
+
category: "ErrorProne",
|
|
585
|
+
severityLevel: "Warning",
|
|
586
|
+
title: "Avoid Duplicate Expression in Condition and Assignment",
|
|
587
|
+
enabled: false,
|
|
588
|
+
parameters: []
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
id: "cppcheck_duplicateExpression",
|
|
592
|
+
category: "ErrorProne",
|
|
593
|
+
severityLevel: "High",
|
|
594
|
+
title: "Avoid Same Expression on Both Sides of Logical Operator",
|
|
595
|
+
enabled: true,
|
|
596
|
+
parameters: []
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
id: "cppcheck_duplicateExpressionTernary",
|
|
600
|
+
category: "CodeStyle",
|
|
601
|
+
severityLevel: "Info",
|
|
602
|
+
title: "Avoid Same Expression in Both Branches of Ternary Operator",
|
|
603
|
+
enabled: true,
|
|
604
|
+
parameters: []
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
id: "cppcheck_duplicateValueTernary",
|
|
608
|
+
category: "ErrorProne",
|
|
609
|
+
severityLevel: "Warning",
|
|
610
|
+
title: "Avoid Same Value in Both Branches of Ternary Operator",
|
|
611
|
+
enabled: false,
|
|
612
|
+
parameters: []
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
id: "cppcheck_duplInheritedMember",
|
|
616
|
+
category: "BestPractice",
|
|
617
|
+
severityLevel: "Warning",
|
|
618
|
+
title: "Avoid Duplicate Member Names in Inheritance Hierarchy",
|
|
619
|
+
enabled: true,
|
|
620
|
+
parameters: []
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
id: "cppcheck_eraseDereference",
|
|
624
|
+
category: "ErrorProne",
|
|
625
|
+
severityLevel: "Error",
|
|
626
|
+
title: "Avoid Using Invalid Iterator in erase()",
|
|
627
|
+
enabled: true,
|
|
628
|
+
parameters: []
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
id: "cppcheck_eraseIteratorOutOfBounds",
|
|
632
|
+
category: "ErrorProne",
|
|
633
|
+
severityLevel: "Error",
|
|
634
|
+
title: "Avoid Calling erase() on Out-of-Bounds Iterator",
|
|
635
|
+
enabled: false,
|
|
636
|
+
parameters: []
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
id: "cppcheck_eraseIteratorOutOfBoundsCond",
|
|
640
|
+
category: "ErrorProne",
|
|
641
|
+
severityLevel: "High",
|
|
642
|
+
title: "Avoid Erasing Using Out-of-Bounds Iterator",
|
|
643
|
+
enabled: false,
|
|
644
|
+
parameters: []
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
id: "cppcheck_exceptDeallocThrow",
|
|
648
|
+
category: "ErrorProne",
|
|
649
|
+
severityLevel: "Error",
|
|
650
|
+
title: "Avoid Throwing Exceptions from Deallocated Memory",
|
|
651
|
+
enabled: true,
|
|
652
|
+
parameters: []
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
id: "cppcheck_exceptRethrowCopy",
|
|
656
|
+
category: "Performance",
|
|
657
|
+
severityLevel: "Warning",
|
|
658
|
+
title: "Avoid Throwing a Copy of the Caught Exception Instead of Rethrowing the Original",
|
|
659
|
+
enabled: true,
|
|
660
|
+
parameters: []
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
id: "cppcheck_exceptThrowInDestructor",
|
|
664
|
+
category: "ErrorProne",
|
|
665
|
+
severityLevel: "Error",
|
|
666
|
+
title: "Avoid Throwing Exceptions from Destructors",
|
|
667
|
+
enabled: true,
|
|
668
|
+
parameters: []
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
id: "cppcheck_fflushOnInputStream",
|
|
672
|
+
category: "ErrorProne",
|
|
673
|
+
severityLevel: "High",
|
|
674
|
+
title: "Avoid calling fflush() on input stream 'stdin'",
|
|
675
|
+
enabled: true,
|
|
676
|
+
parameters: []
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
id: "cppcheck_floatConversionOverflow",
|
|
680
|
+
category: "ErrorProne",
|
|
681
|
+
severityLevel: "High",
|
|
682
|
+
title: "Avoid Floating-Point to Integer Conversion Overflow",
|
|
683
|
+
enabled: false,
|
|
684
|
+
parameters: []
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
id: "cppcheck_funcArgNamesDifferent",
|
|
688
|
+
category: "BestPractice",
|
|
689
|
+
severityLevel: "Warning",
|
|
690
|
+
title: "Enforce Consistent Function Argument Names",
|
|
691
|
+
enabled: false,
|
|
692
|
+
parameters: []
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
id: "cppcheck_funcArgOrderDifferent",
|
|
696
|
+
category: "ErrorProne",
|
|
697
|
+
severityLevel: "High",
|
|
698
|
+
title: "Ensure Consistent Function Argument Order Between Declaration and Definition",
|
|
699
|
+
enabled: false,
|
|
700
|
+
parameters: []
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
id: "cppcheck_functionConst",
|
|
704
|
+
category: "BestPractice",
|
|
705
|
+
severityLevel: "Info",
|
|
706
|
+
title: "Enforce const qualifier on member functions when possible",
|
|
707
|
+
enabled: false,
|
|
708
|
+
parameters: []
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
id: "cppcheck_functionStatic",
|
|
712
|
+
category: "Performance",
|
|
713
|
+
severityLevel: "Warning",
|
|
714
|
+
title: "Enforce Static Declaration for Member Functions That Do Not Access Instance Data",
|
|
715
|
+
enabled: false,
|
|
716
|
+
parameters: []
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
id: "cppcheck_globalLockGuard",
|
|
720
|
+
category: "ErrorProne",
|
|
721
|
+
severityLevel: "High",
|
|
722
|
+
title: "Avoid Defining Lock Guards Globally",
|
|
723
|
+
enabled: false,
|
|
724
|
+
parameters: []
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
id: "cppcheck_identicalConditionAfterEarlyExit",
|
|
728
|
+
category: "ErrorProne",
|
|
729
|
+
severityLevel: "Warning",
|
|
730
|
+
title: "Avoid Identical Condition After Early Exit",
|
|
731
|
+
enabled: false,
|
|
732
|
+
parameters: []
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
id: "cppcheck_identicalInnerCondition",
|
|
736
|
+
category: "CodeStyle",
|
|
737
|
+
severityLevel: "Info",
|
|
738
|
+
title: "Avoid Identical Inner If Conditions",
|
|
739
|
+
enabled: false,
|
|
740
|
+
parameters: []
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
id: "cppcheck_ignoredReturnValue",
|
|
744
|
+
category: "ErrorProne",
|
|
745
|
+
severityLevel: "Error",
|
|
746
|
+
title: "Check Return Value of malloc()",
|
|
747
|
+
enabled: true,
|
|
748
|
+
parameters: []
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
id: "cppcheck_incompatibleFileOpen",
|
|
752
|
+
category: "ErrorProne",
|
|
753
|
+
severityLevel: "High",
|
|
754
|
+
title: "Avoid Opening the Same File for Read and Write Access Simultaneously on Different Streams",
|
|
755
|
+
enabled: false,
|
|
756
|
+
parameters: []
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
id: "cppcheck_incompleteArrayFill",
|
|
760
|
+
category: "ErrorProne",
|
|
761
|
+
severityLevel: "High",
|
|
762
|
+
title: "Avoid Incomplete Filling of Arrays with memset",
|
|
763
|
+
enabled: false,
|
|
764
|
+
parameters: []
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
id: "cppcheck_incorrectCharBooleanError",
|
|
768
|
+
category: "ErrorProne",
|
|
769
|
+
severityLevel: "High",
|
|
770
|
+
title: "Avoid Incorrect Conversion of Char Literal to Boolean",
|
|
771
|
+
enabled: false,
|
|
772
|
+
parameters: []
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
id: "cppcheck_incorrectLogicOperator",
|
|
776
|
+
category: "ErrorProne",
|
|
777
|
+
severityLevel: "High",
|
|
778
|
+
title: "Avoid Logical Operators That Always Evaluate to True or False",
|
|
779
|
+
enabled: true,
|
|
780
|
+
parameters: []
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
id: "cppcheck_incorrectStringBooleanError",
|
|
784
|
+
category: "ErrorProne",
|
|
785
|
+
severityLevel: "High",
|
|
786
|
+
title: "Avoid Incorrect Conversion of String Literal to Boolean",
|
|
787
|
+
enabled: true,
|
|
788
|
+
parameters: []
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
id: "cppcheck_incorrectStringCompare",
|
|
792
|
+
category: "ErrorProne",
|
|
793
|
+
severityLevel: "High",
|
|
794
|
+
title: "Ensure String Literal Length Matches Length Argument in substr()",
|
|
795
|
+
enabled: true,
|
|
796
|
+
parameters: []
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
id: "cppcheck_incrementboolean",
|
|
800
|
+
category: "CodeStyle",
|
|
801
|
+
severityLevel: "Info",
|
|
802
|
+
title: "Avoid Incrementing Boolean Variables with ++ Operator",
|
|
803
|
+
enabled: true,
|
|
804
|
+
parameters: []
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
id: "cppcheck_initializerList",
|
|
808
|
+
category: "ErrorProne",
|
|
809
|
+
severityLevel: "Warning",
|
|
810
|
+
title: "Enforce Correct Order of Member Variables in Initializer List",
|
|
811
|
+
enabled: false,
|
|
812
|
+
parameters: []
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
id: "cppcheck_integerOverflow",
|
|
816
|
+
category: "ErrorProne",
|
|
817
|
+
severityLevel: "Error",
|
|
818
|
+
title: "Avoid Signed Integer Overflow",
|
|
819
|
+
enabled: true,
|
|
820
|
+
parameters: []
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
id: "cppcheck_intToPointerCast",
|
|
824
|
+
category: "ErrorProne",
|
|
825
|
+
severityLevel: "High",
|
|
826
|
+
title: "Avoid Casting Non-Zero Decimal Integer Literal to Pointer",
|
|
827
|
+
enabled: false,
|
|
828
|
+
parameters: []
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
id: "cppcheck_invalidConstFunctionType",
|
|
832
|
+
category: "ErrorProne",
|
|
833
|
+
severityLevel: "High",
|
|
834
|
+
title: "Avoid const qualifying a function type",
|
|
835
|
+
enabled: false,
|
|
836
|
+
parameters: []
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
id: "cppcheck_invalidContainer",
|
|
840
|
+
category: "ErrorProne",
|
|
841
|
+
severityLevel: "High",
|
|
842
|
+
title: "Avoid Using Invalid Container References",
|
|
843
|
+
enabled: false,
|
|
844
|
+
parameters: []
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
id: "cppcheck_invalidContainerLoop",
|
|
848
|
+
category: "ErrorProne",
|
|
849
|
+
severityLevel: "High",
|
|
850
|
+
title: "Avoid Calling 'erase' While Iterating the Container",
|
|
851
|
+
enabled: false,
|
|
852
|
+
parameters: []
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
id: "cppcheck_invalidFree",
|
|
856
|
+
category: "ErrorProne",
|
|
857
|
+
severityLevel: "Error",
|
|
858
|
+
title: "Avoid Freeing Offset Pointer from malloc",
|
|
859
|
+
enabled: false,
|
|
860
|
+
parameters: []
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
id: "cppcheck_invalidFunctionArg",
|
|
864
|
+
category: "ErrorProne",
|
|
865
|
+
severityLevel: "High",
|
|
866
|
+
title: "Avoid invalid function argument values",
|
|
867
|
+
enabled: true,
|
|
868
|
+
parameters: []
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
id: "cppcheck_invalidFunctionArgBool",
|
|
872
|
+
category: "ErrorProne",
|
|
873
|
+
severityLevel: "High",
|
|
874
|
+
title: "Avoid Passing Boolean as First Argument to func_name()",
|
|
875
|
+
enabled: true,
|
|
876
|
+
parameters: []
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
id: "cppcheck_invalidFunctionArgStr",
|
|
880
|
+
category: "ErrorProne",
|
|
881
|
+
severityLevel: "High",
|
|
882
|
+
title: "Enforce Valid Null-Terminated String Argument",
|
|
883
|
+
enabled: false,
|
|
884
|
+
parameters: []
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
id: "cppcheck_invalidIterator1",
|
|
888
|
+
category: "ErrorProne",
|
|
889
|
+
severityLevel: "Error",
|
|
890
|
+
title: "Avoid Using Invalid Iterators",
|
|
891
|
+
enabled: true,
|
|
892
|
+
parameters: []
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
id: "cppcheck_invalidLengthModifierError",
|
|
896
|
+
category: "ErrorProne",
|
|
897
|
+
severityLevel: "High",
|
|
898
|
+
title: "Avoid Using Length Modifiers Without Conversion Specifiers in Format Strings",
|
|
899
|
+
enabled: true,
|
|
900
|
+
parameters: []
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
id: "cppcheck_invalidLifetime",
|
|
904
|
+
category: "ErrorProne",
|
|
905
|
+
severityLevel: "Error",
|
|
906
|
+
title: "Avoid Using Objects That Are Out of Scope",
|
|
907
|
+
enabled: false,
|
|
908
|
+
parameters: []
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
id: "cppcheck_invalidPointerCast",
|
|
912
|
+
category: "ErrorProne",
|
|
913
|
+
severityLevel: "High",
|
|
914
|
+
title: "Avoid Casting Between float* and double* Due to Incompatible Binary Data Representation",
|
|
915
|
+
enabled: true,
|
|
916
|
+
parameters: []
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
id: "cppcheck_invalidPrintfArgType_float",
|
|
920
|
+
category: "ErrorProne",
|
|
921
|
+
severityLevel: "High",
|
|
922
|
+
title: "Ensure Correct Argument Type for %f Format Specifier in printf-style Functions",
|
|
923
|
+
enabled: true,
|
|
924
|
+
parameters: []
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
id: "cppcheck_invalidPrintfArgType_n",
|
|
928
|
+
category: "ErrorProne",
|
|
929
|
+
severityLevel: "Error",
|
|
930
|
+
title: "Avoid Incorrect Argument Type for %n in Format Strings",
|
|
931
|
+
enabled: true,
|
|
932
|
+
parameters: []
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
id: "cppcheck_invalidPrintfArgType_p",
|
|
936
|
+
category: "ErrorProne",
|
|
937
|
+
severityLevel: "High",
|
|
938
|
+
title: "Enforce Correct Usage of %p Format Specifier",
|
|
939
|
+
enabled: true,
|
|
940
|
+
parameters: []
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
id: "cppcheck_invalidPrintfArgType_s",
|
|
944
|
+
category: "ErrorProne",
|
|
945
|
+
severityLevel: "High",
|
|
946
|
+
title: "Avoid Invalid Argument Type for %s in Format String",
|
|
947
|
+
enabled: true,
|
|
948
|
+
parameters: []
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
id: "cppcheck_invalidPrintfArgType_sint",
|
|
952
|
+
category: "ErrorProne",
|
|
953
|
+
severityLevel: "High",
|
|
954
|
+
title: "Ensure Correct Argument Type for %i in printf Format String",
|
|
955
|
+
enabled: true,
|
|
956
|
+
parameters: []
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
id: "cppcheck_invalidPrintfArgType_uint",
|
|
960
|
+
category: "Security",
|
|
961
|
+
severityLevel: "High",
|
|
962
|
+
title: "Enforce correct unsigned int argument types for %u in printf format strings",
|
|
963
|
+
enabled: true,
|
|
964
|
+
parameters: []
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
id: "cppcheck_invalidscanf",
|
|
968
|
+
category: "Security",
|
|
969
|
+
severityLevel: "Error",
|
|
970
|
+
title: "Enforce scanf() Field Width Limits",
|
|
971
|
+
enabled: true,
|
|
972
|
+
parameters: []
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
id: "cppcheck_invalidScanfArgType_float",
|
|
976
|
+
category: "ErrorProne",
|
|
977
|
+
severityLevel: "Error",
|
|
978
|
+
title: "Ensure Correct Argument Type for %f Format Specifier",
|
|
979
|
+
enabled: true,
|
|
980
|
+
parameters: []
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
id: "cppcheck_invalidScanfArgType_int",
|
|
984
|
+
category: "ErrorProne",
|
|
985
|
+
severityLevel: "High",
|
|
986
|
+
title: "Ensure Correct Argument Type for %d in scanf",
|
|
987
|
+
enabled: true,
|
|
988
|
+
parameters: []
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
id: "cppcheck_invalidScanfArgType_s",
|
|
992
|
+
category: "ErrorProne",
|
|
993
|
+
severityLevel: "High",
|
|
994
|
+
title: "Ensure Correct Argument Type for %s in scanf Format String",
|
|
995
|
+
enabled: true,
|
|
996
|
+
parameters: []
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
id: "cppcheck_invalidScanfFormatWidth",
|
|
1000
|
+
category: "ErrorProne",
|
|
1001
|
+
severityLevel: "High",
|
|
1002
|
+
title: "Avoid Using Width Specifiers Larger Than Destination Buffer in scanf Format Strings",
|
|
1003
|
+
enabled: true,
|
|
1004
|
+
parameters: []
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
id: "cppcheck_invalidScanfFormatWidth_smaller",
|
|
1008
|
+
category: "Security",
|
|
1009
|
+
severityLevel: "High",
|
|
1010
|
+
title: "Avoid invalid scanf format width smaller than destination buffer",
|
|
1011
|
+
enabled: false,
|
|
1012
|
+
parameters: []
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
id: "cppcheck_invalidTestForOverflow",
|
|
1016
|
+
category: "ErrorProne",
|
|
1017
|
+
severityLevel: "High",
|
|
1018
|
+
title: "Avoid Invalid Test for Signed Integer Overflow",
|
|
1019
|
+
enabled: false,
|
|
1020
|
+
parameters: []
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
id: "cppcheck_IOWithoutPositioning",
|
|
1024
|
+
category: "ErrorProne",
|
|
1025
|
+
severityLevel: "High",
|
|
1026
|
+
title: "Avoid Read and Write Operations Without Positioning or Flushing",
|
|
1027
|
+
enabled: true,
|
|
1028
|
+
parameters: []
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
id: "cppcheck_iterators1",
|
|
1032
|
+
category: "ErrorProne",
|
|
1033
|
+
severityLevel: "High",
|
|
1034
|
+
title: "Avoid Using the Same Iterator with Different Containers",
|
|
1035
|
+
enabled: false,
|
|
1036
|
+
parameters: []
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
id: "cppcheck_iterators2",
|
|
1040
|
+
category: "ErrorProne",
|
|
1041
|
+
severityLevel: "High",
|
|
1042
|
+
title: "Avoid Using the Same Iterator with Different Containers",
|
|
1043
|
+
enabled: false,
|
|
1044
|
+
parameters: []
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
id: "cppcheck_iterators3",
|
|
1048
|
+
category: "ErrorProne",
|
|
1049
|
+
severityLevel: "High",
|
|
1050
|
+
title: "Avoid Using the Same Iterator with Different Containers",
|
|
1051
|
+
enabled: false,
|
|
1052
|
+
parameters: []
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
id: "cppcheck_knownArgument",
|
|
1056
|
+
category: "ErrorProne",
|
|
1057
|
+
severityLevel: "Warning",
|
|
1058
|
+
title: "Avoid Passing Arguments That Always Evaluate to Zero",
|
|
1059
|
+
enabled: false,
|
|
1060
|
+
parameters: []
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
id: "cppcheck_knownArgumentHiddenVariableExpression",
|
|
1064
|
+
category: "ErrorProne",
|
|
1065
|
+
severityLevel: "Warning",
|
|
1066
|
+
title: "Avoid Passing Constant Zero Expressions as Function Arguments",
|
|
1067
|
+
enabled: false,
|
|
1068
|
+
parameters: []
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
id: "cppcheck_knownConditionTrueFalse",
|
|
1072
|
+
category: "ErrorProne",
|
|
1073
|
+
severityLevel: "High",
|
|
1074
|
+
title: "Avoid Conditions That Are Always True or False",
|
|
1075
|
+
enabled: true,
|
|
1076
|
+
parameters: []
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
id: "cppcheck_knownEmptyContainer",
|
|
1080
|
+
category: "Performance",
|
|
1081
|
+
severityLevel: "Warning",
|
|
1082
|
+
title: "Avoid Iterating Over Containers That Are Always Empty",
|
|
1083
|
+
enabled: false,
|
|
1084
|
+
parameters: []
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
id: "cppcheck_knownPointerToBool",
|
|
1088
|
+
category: "ErrorProne",
|
|
1089
|
+
severityLevel: "High",
|
|
1090
|
+
title: "Avoid Pointer Expressions Converted to Bool Always True",
|
|
1091
|
+
enabled: false,
|
|
1092
|
+
parameters: []
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
id: "cppcheck_leakNoVarFunctionCall",
|
|
1096
|
+
category: "ErrorProne",
|
|
1097
|
+
severityLevel: "High",
|
|
1098
|
+
title: "Detect Memory Allocation Without Proper Release",
|
|
1099
|
+
enabled: true,
|
|
1100
|
+
parameters: []
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
id: "cppcheck_leakReturnValNotUsed",
|
|
1104
|
+
category: "ErrorProne",
|
|
1105
|
+
severityLevel: "High",
|
|
1106
|
+
title: "Avoid Ignoring Return Value of Allocation Function",
|
|
1107
|
+
enabled: true,
|
|
1108
|
+
parameters: []
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
id: "cppcheck_leakUnsafeArgAlloc",
|
|
1112
|
+
category: "ErrorProne",
|
|
1113
|
+
severityLevel: "High",
|
|
1114
|
+
title: "Avoid Unsafe Allocation Leading to Memory Leak",
|
|
1115
|
+
enabled: false,
|
|
1116
|
+
parameters: []
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
id: "cppcheck_literalWithCharPtrCompare",
|
|
1120
|
+
category: "ErrorProne",
|
|
1121
|
+
severityLevel: "High",
|
|
1122
|
+
title: "Avoid Comparing String Literals Directly with Character Pointer Variables",
|
|
1123
|
+
enabled: true,
|
|
1124
|
+
parameters: []
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
id: "cppcheck_localMutex",
|
|
1128
|
+
category: "ErrorProne",
|
|
1129
|
+
severityLevel: "High",
|
|
1130
|
+
title: "Avoid Ineffective Mutex Locking in the Same Scope",
|
|
1131
|
+
enabled: false,
|
|
1132
|
+
parameters: []
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
id: "cppcheck_macroWithSemicolon",
|
|
1136
|
+
category: "ErrorProne",
|
|
1137
|
+
severityLevel: "High",
|
|
1138
|
+
title: "Ensure Macro Definitions Are Provided Using Compiler Flags",
|
|
1139
|
+
enabled: false,
|
|
1140
|
+
parameters: []
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
id: "cppcheck_mallocOnClassError",
|
|
1144
|
+
category: "ErrorProne",
|
|
1145
|
+
severityLevel: "High",
|
|
1146
|
+
title: "Avoid Allocating Class Instances with malloc() When Class Contains std::string",
|
|
1147
|
+
enabled: true,
|
|
1148
|
+
parameters: []
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
id: "cppcheck_mallocOnClassWarning",
|
|
1152
|
+
category: "ErrorProne",
|
|
1153
|
+
severityLevel: "High",
|
|
1154
|
+
title: "Avoid Allocating Class Instances with malloc() Instead of Constructors",
|
|
1155
|
+
enabled: true,
|
|
1156
|
+
parameters: []
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
id: "cppcheck_memleak",
|
|
1160
|
+
category: "ErrorProne",
|
|
1161
|
+
severityLevel: "Error",
|
|
1162
|
+
title: "Avoid Memory Leaks",
|
|
1163
|
+
enabled: true,
|
|
1164
|
+
parameters: []
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
id: "cppcheck_memleakOnRealloc",
|
|
1168
|
+
category: "ErrorProne",
|
|
1169
|
+
severityLevel: "High",
|
|
1170
|
+
title: "Avoid Memory Leak on realloc Failure",
|
|
1171
|
+
enabled: true,
|
|
1172
|
+
parameters: []
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
id: "cppcheck_memsetClass",
|
|
1176
|
+
category: "ErrorProne",
|
|
1177
|
+
severityLevel: "High",
|
|
1178
|
+
title: "Avoid Using memset on Classes Containing Class Members",
|
|
1179
|
+
enabled: true,
|
|
1180
|
+
parameters: []
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
id: "cppcheck_memsetClassFloat",
|
|
1184
|
+
category: "ErrorProne",
|
|
1185
|
+
severityLevel: "High",
|
|
1186
|
+
title: "Avoid Using memset() on Classes Containing Floating-Point Numbers",
|
|
1187
|
+
enabled: true,
|
|
1188
|
+
parameters: []
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
id: "cppcheck_memsetClassReference",
|
|
1192
|
+
category: "ErrorProne",
|
|
1193
|
+
severityLevel: "High",
|
|
1194
|
+
title: "Avoid Using memset on Classes Containing References",
|
|
1195
|
+
enabled: true,
|
|
1196
|
+
parameters: []
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
id: "cppcheck_memsetFloat",
|
|
1200
|
+
category: "ErrorProne",
|
|
1201
|
+
severityLevel: "High",
|
|
1202
|
+
title: "Avoid Using Float as Second Argument in memset()",
|
|
1203
|
+
enabled: true,
|
|
1204
|
+
parameters: []
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
id: "cppcheck_memsetValueOutOfRange",
|
|
1208
|
+
category: "ErrorProne",
|
|
1209
|
+
severityLevel: "High",
|
|
1210
|
+
title: "Avoid Passing Values to memset() That Don't Fit into an unsigned char",
|
|
1211
|
+
enabled: true,
|
|
1212
|
+
parameters: []
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
id: "cppcheck_memsetZeroBytes",
|
|
1216
|
+
category: "ErrorProne",
|
|
1217
|
+
severityLevel: "Warning",
|
|
1218
|
+
title: "Avoid calling memset() to fill 0 bytes",
|
|
1219
|
+
enabled: true,
|
|
1220
|
+
parameters: []
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
id: "cppcheck_mismatchAllocDealloc",
|
|
1224
|
+
category: "ErrorProne",
|
|
1225
|
+
severityLevel: "Error",
|
|
1226
|
+
title: "Avoid Mismatching Allocation and Deallocation",
|
|
1227
|
+
enabled: true,
|
|
1228
|
+
parameters: []
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
id: "cppcheck_mismatchingBitAnd",
|
|
1232
|
+
category: "ErrorProne",
|
|
1233
|
+
severityLevel: "Warning",
|
|
1234
|
+
title: "Avoid Mismatching Bitmasks in Bitwise AND Operations",
|
|
1235
|
+
enabled: true,
|
|
1236
|
+
parameters: []
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
id: "cppcheck_mismatchingContainerExpression",
|
|
1240
|
+
category: "ErrorProne",
|
|
1241
|
+
severityLevel: "High",
|
|
1242
|
+
title: "Avoid Using Iterators from Different Containers Together",
|
|
1243
|
+
enabled: false,
|
|
1244
|
+
parameters: []
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
id: "cppcheck_mismatchingContainerIterator",
|
|
1248
|
+
category: "ErrorProne",
|
|
1249
|
+
severityLevel: "Error",
|
|
1250
|
+
title: "Avoid Using Iterators from Different Containers Interchangeably",
|
|
1251
|
+
enabled: false,
|
|
1252
|
+
parameters: []
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
id: "cppcheck_mismatchingContainers",
|
|
1256
|
+
category: "ErrorProne",
|
|
1257
|
+
severityLevel: "High",
|
|
1258
|
+
title: "Avoid Using Iterators from Different Containers Together",
|
|
1259
|
+
enabled: true,
|
|
1260
|
+
parameters: []
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
id: "cppcheck_misra-c2012-10.1",
|
|
1264
|
+
category: "ErrorProne",
|
|
1265
|
+
severityLevel: "Warning",
|
|
1266
|
+
title: "Operands shall not be of an inappropriate essential type",
|
|
1267
|
+
enabled: false,
|
|
1268
|
+
parameters: []
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
id: "cppcheck_misra-c2012-10.4",
|
|
1272
|
+
category: "ErrorProne",
|
|
1273
|
+
severityLevel: "Warning",
|
|
1274
|
+
title: "Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category",
|
|
1275
|
+
enabled: false,
|
|
1276
|
+
parameters: []
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
id: "cppcheck_misra-c2012-10.6",
|
|
1280
|
+
category: "ErrorProne",
|
|
1281
|
+
severityLevel: "Warning",
|
|
1282
|
+
title: "The value of a composite expression shall not be assigned to an object with wider essential type",
|
|
1283
|
+
enabled: false,
|
|
1284
|
+
parameters: []
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
id: "cppcheck_misra-c2012-10.8",
|
|
1288
|
+
category: "ErrorProne",
|
|
1289
|
+
severityLevel: "Warning",
|
|
1290
|
+
title: "The value of a composite expression shall not be cast to a different essential type category or a wider essential type",
|
|
1291
|
+
enabled: false,
|
|
1292
|
+
parameters: []
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
id: "cppcheck_misra-c2012-11.3",
|
|
1296
|
+
category: "ErrorProne",
|
|
1297
|
+
severityLevel: "Warning",
|
|
1298
|
+
title: "A cast shall not be performed between a pointer to object type and a pointer to a different object type",
|
|
1299
|
+
enabled: false,
|
|
1300
|
+
parameters: []
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
id: "cppcheck_misra-c2012-11.4",
|
|
1304
|
+
category: "ErrorProne",
|
|
1305
|
+
severityLevel: "Warning",
|
|
1306
|
+
title: "A conversion should not be performed between a pointer to object and an integer type",
|
|
1307
|
+
enabled: false,
|
|
1308
|
+
parameters: []
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
id: "cppcheck_misra-c2012-11.5",
|
|
1312
|
+
category: "ErrorProne",
|
|
1313
|
+
severityLevel: "Warning",
|
|
1314
|
+
title: "A conversion should not be performed from pointer to void into pointer to object",
|
|
1315
|
+
enabled: false,
|
|
1316
|
+
parameters: []
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
id: "cppcheck_misra-c2012-11.6",
|
|
1320
|
+
category: "ErrorProne",
|
|
1321
|
+
severityLevel: "Warning",
|
|
1322
|
+
title: "A cast shall not be performed between pointer to void and an arithmetic type",
|
|
1323
|
+
enabled: false,
|
|
1324
|
+
parameters: []
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
id: "cppcheck_misra-c2012-11.7",
|
|
1328
|
+
category: "ErrorProne",
|
|
1329
|
+
severityLevel: "Warning",
|
|
1330
|
+
title: "A cast shall not be performed between pointer to object and a non-integer arithmetic type",
|
|
1331
|
+
enabled: false,
|
|
1332
|
+
parameters: []
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
id: "cppcheck_misra-c2012-11.8",
|
|
1336
|
+
category: "ErrorProne",
|
|
1337
|
+
severityLevel: "Warning",
|
|
1338
|
+
title: "A cast shall not remove any const or volatile qualification from the type pointed to by a pointer",
|
|
1339
|
+
enabled: false,
|
|
1340
|
+
parameters: []
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
id: "cppcheck_misra-c2012-11.9",
|
|
1344
|
+
category: "ErrorProne",
|
|
1345
|
+
severityLevel: "Warning",
|
|
1346
|
+
title: "The macro NULL shall be the only permitted form of integer null pointer constant",
|
|
1347
|
+
enabled: false,
|
|
1348
|
+
parameters: []
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
id: "cppcheck_misra-c2012-12.1",
|
|
1352
|
+
category: "ErrorProne",
|
|
1353
|
+
severityLevel: "Warning",
|
|
1354
|
+
title: "The precedence of operators within expressions should be made explicit",
|
|
1355
|
+
enabled: false,
|
|
1356
|
+
parameters: []
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
id: "cppcheck_misra-c2012-12.2",
|
|
1360
|
+
category: "ErrorProne",
|
|
1361
|
+
severityLevel: "Warning",
|
|
1362
|
+
title: "The right hand operand of a shift operator shall lie in the range zero to one less than the width in bits of the essential type of the left hand operand",
|
|
1363
|
+
enabled: false,
|
|
1364
|
+
parameters: []
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
id: "cppcheck_misra-c2012-12.3",
|
|
1368
|
+
category: "ErrorProne",
|
|
1369
|
+
severityLevel: "Warning",
|
|
1370
|
+
title: "The comma operator should not be used",
|
|
1371
|
+
enabled: false,
|
|
1372
|
+
parameters: []
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
id: "cppcheck_misra-c2012-12.4",
|
|
1376
|
+
category: "ErrorProne",
|
|
1377
|
+
severityLevel: "Warning",
|
|
1378
|
+
title: "Evaluation of constant expressions should not lead to unsigned integer wrap-around",
|
|
1379
|
+
enabled: false,
|
|
1380
|
+
parameters: []
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
id: "cppcheck_misra-c2012-1.3",
|
|
1384
|
+
category: "ErrorProne",
|
|
1385
|
+
severityLevel: "Warning",
|
|
1386
|
+
title: "There shall be no occurrence of undefined or critical unspecified behaviour",
|
|
1387
|
+
enabled: false,
|
|
1388
|
+
parameters: []
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
id: "cppcheck_misra-c2012-13.1",
|
|
1392
|
+
category: "ErrorProne",
|
|
1393
|
+
severityLevel: "Warning",
|
|
1394
|
+
title: "Initializer lists shall not contain persistent side effects",
|
|
1395
|
+
enabled: false,
|
|
1396
|
+
parameters: []
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
id: "cppcheck_misra-c2012-13.2",
|
|
1400
|
+
category: "ErrorProne",
|
|
1401
|
+
severityLevel: "Warning",
|
|
1402
|
+
title: "The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders",
|
|
1403
|
+
enabled: false,
|
|
1404
|
+
parameters: []
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
id: "cppcheck_misra-c2012-13.3",
|
|
1408
|
+
category: "ErrorProne",
|
|
1409
|
+
severityLevel: "Warning",
|
|
1410
|
+
title: "A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator",
|
|
1411
|
+
enabled: false,
|
|
1412
|
+
parameters: []
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
id: "cppcheck_misra-c2012-13.4",
|
|
1416
|
+
category: "ErrorProne",
|
|
1417
|
+
severityLevel: "Warning",
|
|
1418
|
+
title: "The result of an assignment operator should not be used",
|
|
1419
|
+
enabled: false,
|
|
1420
|
+
parameters: []
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
id: "cppcheck_misra-c2012-13.5",
|
|
1424
|
+
category: "ErrorProne",
|
|
1425
|
+
severityLevel: "Warning",
|
|
1426
|
+
title: "The right hand operand of a logical && or '' operator shall not contain persistent side effects",
|
|
1427
|
+
enabled: false,
|
|
1428
|
+
parameters: []
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
id: "cppcheck_misra-c2012-13.6",
|
|
1432
|
+
category: "ErrorProne",
|
|
1433
|
+
severityLevel: "Warning",
|
|
1434
|
+
title: "The operand of the sizeof operator shall not contain any expression which has potential side effects",
|
|
1435
|
+
enabled: false,
|
|
1436
|
+
parameters: []
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
id: "cppcheck_misra-c2012-14.1",
|
|
1440
|
+
category: "ErrorProne",
|
|
1441
|
+
severityLevel: "Warning",
|
|
1442
|
+
title: "A loop counter shall not have essentially floating type",
|
|
1443
|
+
enabled: false,
|
|
1444
|
+
parameters: []
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
id: "cppcheck_misra-c2012-14.2",
|
|
1448
|
+
category: "ErrorProne",
|
|
1449
|
+
severityLevel: "Warning",
|
|
1450
|
+
title: "A for loop shall be well-formed",
|
|
1451
|
+
enabled: false,
|
|
1452
|
+
parameters: []
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
id: "cppcheck_misra-c2012-14.3",
|
|
1456
|
+
category: "ErrorProne",
|
|
1457
|
+
severityLevel: "Warning",
|
|
1458
|
+
title: "Controlling expressions shall not be invariant",
|
|
1459
|
+
enabled: false,
|
|
1460
|
+
parameters: []
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
id: "cppcheck_misra-c2012-14.4",
|
|
1464
|
+
category: "ErrorProne",
|
|
1465
|
+
severityLevel: "Warning",
|
|
1466
|
+
title: "The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type",
|
|
1467
|
+
enabled: false,
|
|
1468
|
+
parameters: []
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
id: "cppcheck_misra-c2012-15.1",
|
|
1472
|
+
category: "ErrorProne",
|
|
1473
|
+
severityLevel: "Warning",
|
|
1474
|
+
title: "The goto statement should not be used",
|
|
1475
|
+
enabled: false,
|
|
1476
|
+
parameters: []
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
id: "cppcheck_misra-c2012-15.2",
|
|
1480
|
+
category: "ErrorProne",
|
|
1481
|
+
severityLevel: "Warning",
|
|
1482
|
+
title: "The goto statement shall jump to a label declared later in the same function",
|
|
1483
|
+
enabled: false,
|
|
1484
|
+
parameters: []
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
id: "cppcheck_misra-c2012-15.3",
|
|
1488
|
+
category: "ErrorProne",
|
|
1489
|
+
severityLevel: "Warning",
|
|
1490
|
+
title: "Any label referenced by a goto statement shall be declared in the same block, or in any block enclosing the goto statement",
|
|
1491
|
+
enabled: false,
|
|
1492
|
+
parameters: []
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
id: "cppcheck_misra-c2012-15.5",
|
|
1496
|
+
category: "ErrorProne",
|
|
1497
|
+
severityLevel: "Warning",
|
|
1498
|
+
title: "A function should have a single point of exit at the end",
|
|
1499
|
+
enabled: false,
|
|
1500
|
+
parameters: []
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
id: "cppcheck_misra-c2012-15.6",
|
|
1504
|
+
category: "ErrorProne",
|
|
1505
|
+
severityLevel: "Warning",
|
|
1506
|
+
title: "The body of an iteration-statement or a selection-statement shall be a compound-statement",
|
|
1507
|
+
enabled: false,
|
|
1508
|
+
parameters: []
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
id: "cppcheck_misra-c2012-15.7",
|
|
1512
|
+
category: "ErrorProne",
|
|
1513
|
+
severityLevel: "Warning",
|
|
1514
|
+
title: "All if ... else if constructs shall be terminated with an else statement",
|
|
1515
|
+
enabled: false,
|
|
1516
|
+
parameters: []
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
id: "cppcheck_misra-c2012-16.2",
|
|
1520
|
+
category: "ErrorProne",
|
|
1521
|
+
severityLevel: "Warning",
|
|
1522
|
+
title: "A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement",
|
|
1523
|
+
enabled: false,
|
|
1524
|
+
parameters: []
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
id: "cppcheck_misra-c2012-16.3",
|
|
1528
|
+
category: "ErrorProne",
|
|
1529
|
+
severityLevel: "Warning",
|
|
1530
|
+
title: "An unconditional break statement shall terminate every switch-clause",
|
|
1531
|
+
enabled: false,
|
|
1532
|
+
parameters: []
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
id: "cppcheck_misra-c2012-16.4",
|
|
1536
|
+
category: "ErrorProne",
|
|
1537
|
+
severityLevel: "Warning",
|
|
1538
|
+
title: "Every switch statement shall have a default label",
|
|
1539
|
+
enabled: false,
|
|
1540
|
+
parameters: []
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
id: "cppcheck_misra-c2012-16.5",
|
|
1544
|
+
category: "ErrorProne",
|
|
1545
|
+
severityLevel: "Warning",
|
|
1546
|
+
title: "A default label shall appear as either the first or the last switch label of a switch statement",
|
|
1547
|
+
enabled: false,
|
|
1548
|
+
parameters: []
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
id: "cppcheck_misra-c2012-16.6",
|
|
1552
|
+
category: "ErrorProne",
|
|
1553
|
+
severityLevel: "Warning",
|
|
1554
|
+
title: "Every switch statement shall have at least two switch-clauses",
|
|
1555
|
+
enabled: false,
|
|
1556
|
+
parameters: []
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
id: "cppcheck_misra-c2012-16.7",
|
|
1560
|
+
category: "ErrorProne",
|
|
1561
|
+
severityLevel: "Warning",
|
|
1562
|
+
title: "A switch-expression shall not have essentially Boolean type",
|
|
1563
|
+
enabled: false,
|
|
1564
|
+
parameters: []
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
id: "cppcheck_misra-c2012-17.1",
|
|
1568
|
+
category: "ErrorProne",
|
|
1569
|
+
severityLevel: "Warning",
|
|
1570
|
+
title: "The features of <stdarg.h> shall not be used",
|
|
1571
|
+
enabled: false,
|
|
1572
|
+
parameters: []
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
id: "cppcheck_misra-c2012-17.2",
|
|
1576
|
+
category: "ErrorProne",
|
|
1577
|
+
severityLevel: "Warning",
|
|
1578
|
+
title: "Functions shall not call themselves, either directly or indirectly",
|
|
1579
|
+
enabled: false,
|
|
1580
|
+
parameters: []
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
id: "cppcheck_misra-c2012-17.5",
|
|
1584
|
+
category: "ErrorProne",
|
|
1585
|
+
severityLevel: "Warning",
|
|
1586
|
+
title: "The function argument corresponding to a parameter declared to have an array type shall have an appropriate number of elements",
|
|
1587
|
+
enabled: false,
|
|
1588
|
+
parameters: []
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
id: "cppcheck_misra-c2012-17.6",
|
|
1592
|
+
category: "ErrorProne",
|
|
1593
|
+
severityLevel: "Warning",
|
|
1594
|
+
title: "The declaration of an array parameter shall not contain the static keyword between the [ ]",
|
|
1595
|
+
enabled: false,
|
|
1596
|
+
parameters: []
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
id: "cppcheck_misra-c2012-17.7",
|
|
1600
|
+
category: "ErrorProne",
|
|
1601
|
+
severityLevel: "Warning",
|
|
1602
|
+
title: "The value returned by a function having non-void return type shall be used",
|
|
1603
|
+
enabled: false,
|
|
1604
|
+
parameters: []
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
id: "cppcheck_misra-c2012-17.8",
|
|
1608
|
+
category: "ErrorProne",
|
|
1609
|
+
severityLevel: "Warning",
|
|
1610
|
+
title: "A function parameter should not be modified",
|
|
1611
|
+
enabled: false,
|
|
1612
|
+
parameters: []
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
id: "cppcheck_misra-c2012-18.1",
|
|
1616
|
+
category: "ErrorProne",
|
|
1617
|
+
severityLevel: "Warning",
|
|
1618
|
+
title: "A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand",
|
|
1619
|
+
enabled: false,
|
|
1620
|
+
parameters: []
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
id: "cppcheck_misra-c2012-18.2",
|
|
1624
|
+
category: "ErrorProne",
|
|
1625
|
+
severityLevel: "Warning",
|
|
1626
|
+
title: "Subtraction between pointers shall only be applied to pointers that address elements of the same array",
|
|
1627
|
+
enabled: false,
|
|
1628
|
+
parameters: []
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
id: "cppcheck_misra-c2012-18.3",
|
|
1632
|
+
category: "ErrorProne",
|
|
1633
|
+
severityLevel: "Warning",
|
|
1634
|
+
title: "The relational operators >, >=, < and <= shall not be applied to objects of pointer type except where they point into the same object",
|
|
1635
|
+
enabled: false,
|
|
1636
|
+
parameters: []
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
id: "cppcheck_misra-c2012-18.4",
|
|
1640
|
+
category: "ErrorProne",
|
|
1641
|
+
severityLevel: "Warning",
|
|
1642
|
+
title: "The +, -, += and -= operators should not be applied to an expression of pointer type",
|
|
1643
|
+
enabled: false,
|
|
1644
|
+
parameters: []
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
id: "cppcheck_misra-c2012-18.5",
|
|
1648
|
+
category: "ErrorProne",
|
|
1649
|
+
severityLevel: "Warning",
|
|
1650
|
+
title: "Declarations should contain no more than two levels of pointer nesting",
|
|
1651
|
+
enabled: false,
|
|
1652
|
+
parameters: []
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
id: "cppcheck_misra-c2012-18.6",
|
|
1656
|
+
category: "ErrorProne",
|
|
1657
|
+
severityLevel: "Warning",
|
|
1658
|
+
title: "The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist",
|
|
1659
|
+
enabled: false,
|
|
1660
|
+
parameters: []
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
id: "cppcheck_misra-c2012-18.7",
|
|
1664
|
+
category: "ErrorProne",
|
|
1665
|
+
severityLevel: "Warning",
|
|
1666
|
+
title: "Flexible array members shall not be declared",
|
|
1667
|
+
enabled: false,
|
|
1668
|
+
parameters: []
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
id: "cppcheck_misra-c2012-18.8",
|
|
1672
|
+
category: "ErrorProne",
|
|
1673
|
+
severityLevel: "Warning",
|
|
1674
|
+
title: "Variable-length array types shall not be used",
|
|
1675
|
+
enabled: false,
|
|
1676
|
+
parameters: []
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
id: "cppcheck_misra-c2012-19.2",
|
|
1680
|
+
category: "ErrorProne",
|
|
1681
|
+
severityLevel: "Warning",
|
|
1682
|
+
title: "The union keyword should not be used",
|
|
1683
|
+
enabled: false,
|
|
1684
|
+
parameters: []
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
id: "cppcheck_misra-c2012-20.1",
|
|
1688
|
+
category: "ErrorProne",
|
|
1689
|
+
severityLevel: "Warning",
|
|
1690
|
+
title: "#include directives should only be preceded by preprocessor directives or comments",
|
|
1691
|
+
enabled: false,
|
|
1692
|
+
parameters: []
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
id: "cppcheck_misra-c2012-20.10",
|
|
1696
|
+
category: "ErrorProne",
|
|
1697
|
+
severityLevel: "Warning",
|
|
1698
|
+
title: "The # and ## preprocessor operators should not be used ",
|
|
1699
|
+
enabled: false,
|
|
1700
|
+
parameters: []
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
id: "cppcheck_misra-c2012-20.13",
|
|
1704
|
+
category: "ErrorProne",
|
|
1705
|
+
severityLevel: "Warning",
|
|
1706
|
+
title: "A line whose first token is # shall be a valid preprocessing directive",
|
|
1707
|
+
enabled: false,
|
|
1708
|
+
parameters: []
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
id: "cppcheck_misra-c2012-20.14",
|
|
1712
|
+
category: "ErrorProne",
|
|
1713
|
+
severityLevel: "Warning",
|
|
1714
|
+
title: "All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if, #ifdef or #ifndef",
|
|
1715
|
+
enabled: false,
|
|
1716
|
+
parameters: []
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
id: "cppcheck_misra-c2012-20.2",
|
|
1720
|
+
category: "ErrorProne",
|
|
1721
|
+
severityLevel: "Warning",
|
|
1722
|
+
title: `The ', " or \\ characters and the /* or // character sequences shall not occur in a header file name`,
|
|
1723
|
+
enabled: false,
|
|
1724
|
+
parameters: []
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
id: "cppcheck_misra-c2012-20.3",
|
|
1728
|
+
category: "ErrorProne",
|
|
1729
|
+
severityLevel: "Warning",
|
|
1730
|
+
title: 'The #include directive shall be followed by either a <filename> or "filename" sequence',
|
|
1731
|
+
enabled: false,
|
|
1732
|
+
parameters: []
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
id: "cppcheck_misra-c2012-20.4",
|
|
1736
|
+
category: "ErrorProne",
|
|
1737
|
+
severityLevel: "Warning",
|
|
1738
|
+
title: "A macro shall not be defined with the same name as a keyword",
|
|
1739
|
+
enabled: false,
|
|
1740
|
+
parameters: []
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
id: "cppcheck_misra-c2012-20.5",
|
|
1744
|
+
category: "ErrorProne",
|
|
1745
|
+
severityLevel: "Warning",
|
|
1746
|
+
title: "#undef should not be used",
|
|
1747
|
+
enabled: false,
|
|
1748
|
+
parameters: []
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
id: "cppcheck_misra-c2012-20.6",
|
|
1752
|
+
category: "ErrorProne",
|
|
1753
|
+
severityLevel: "Warning",
|
|
1754
|
+
title: "Tokens that look like a preprocessing directive shall not occur within a macro argument",
|
|
1755
|
+
enabled: false,
|
|
1756
|
+
parameters: []
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
id: "cppcheck_misra-c2012-20.7",
|
|
1760
|
+
category: "ErrorProne",
|
|
1761
|
+
severityLevel: "Warning",
|
|
1762
|
+
title: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses",
|
|
1763
|
+
enabled: false,
|
|
1764
|
+
parameters: []
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
id: "cppcheck_misra-c2012-2.1",
|
|
1768
|
+
category: "ErrorProne",
|
|
1769
|
+
severityLevel: "Warning",
|
|
1770
|
+
title: "A project shall not contain unreachable code",
|
|
1771
|
+
enabled: false,
|
|
1772
|
+
parameters: []
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
id: "cppcheck_misra-c2012-21.10",
|
|
1776
|
+
category: "ErrorProne",
|
|
1777
|
+
severityLevel: "Warning",
|
|
1778
|
+
title: "The Standard Library time and date functions shall not be used",
|
|
1779
|
+
enabled: false,
|
|
1780
|
+
parameters: []
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
id: "cppcheck_misra-c2012-21.11",
|
|
1784
|
+
category: "ErrorProne",
|
|
1785
|
+
severityLevel: "Warning",
|
|
1786
|
+
title: "The standard header file <tgmath.h> shall not be used",
|
|
1787
|
+
enabled: false,
|
|
1788
|
+
parameters: []
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
id: "cppcheck_misra-c2012-21.3",
|
|
1792
|
+
category: "ErrorProne",
|
|
1793
|
+
severityLevel: "Warning",
|
|
1794
|
+
title: "The memory allocation and deallocation functions of <stdlib.h> shall not be used",
|
|
1795
|
+
enabled: false,
|
|
1796
|
+
parameters: []
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
id: "cppcheck_misra-c2012-21.4",
|
|
1800
|
+
category: "ErrorProne",
|
|
1801
|
+
severityLevel: "Warning",
|
|
1802
|
+
title: "The standard header file <setjmp.h> shall not be used",
|
|
1803
|
+
enabled: false,
|
|
1804
|
+
parameters: []
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
id: "cppcheck_misra-c2012-21.5",
|
|
1808
|
+
category: "ErrorProne",
|
|
1809
|
+
severityLevel: "Warning",
|
|
1810
|
+
title: "The standard header file <signal.h> shall not be used",
|
|
1811
|
+
enabled: false,
|
|
1812
|
+
parameters: []
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
id: "cppcheck_misra-c2012-21.6",
|
|
1816
|
+
category: "ErrorProne",
|
|
1817
|
+
severityLevel: "Warning",
|
|
1818
|
+
title: "The Standard Library input/output routines shall not be used",
|
|
1819
|
+
enabled: false,
|
|
1820
|
+
parameters: []
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
id: "cppcheck_misra-c2012-21.7",
|
|
1824
|
+
category: "ErrorProne",
|
|
1825
|
+
severityLevel: "Warning",
|
|
1826
|
+
title: "The Standard Library functions atof, atoi, atol and atoll of <stdlib.h> shall not be used",
|
|
1827
|
+
enabled: false,
|
|
1828
|
+
parameters: []
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
id: "cppcheck_misra-c2012-21.8",
|
|
1832
|
+
category: "ErrorProne",
|
|
1833
|
+
severityLevel: "Warning",
|
|
1834
|
+
title: "The Standard Library termination functions of <stdlib.h> shall not be used",
|
|
1835
|
+
enabled: false,
|
|
1836
|
+
parameters: []
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
id: "cppcheck_misra-c2012-21.9",
|
|
1840
|
+
category: "ErrorProne",
|
|
1841
|
+
severityLevel: "Warning",
|
|
1842
|
+
title: "The library functions bsearch and qsort of <stdlib.h> shall not be used",
|
|
1843
|
+
enabled: false,
|
|
1844
|
+
parameters: []
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
id: "cppcheck_misra-c2012-2.2",
|
|
1848
|
+
category: "ErrorProne",
|
|
1849
|
+
severityLevel: "Warning",
|
|
1850
|
+
title: "There shall be no dead code",
|
|
1851
|
+
enabled: false,
|
|
1852
|
+
parameters: []
|
|
1853
|
+
},
|
|
1854
|
+
{
|
|
1855
|
+
id: "cppcheck_misra-c2012-22.1",
|
|
1856
|
+
category: "ErrorProne",
|
|
1857
|
+
severityLevel: "Warning",
|
|
1858
|
+
title: "All resources obtained dynamically by means of Standard Library functions shall be explicitly released",
|
|
1859
|
+
enabled: false,
|
|
1860
|
+
parameters: []
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
id: "cppcheck_misra-c2012-22.2",
|
|
1864
|
+
category: "ErrorProne",
|
|
1865
|
+
severityLevel: "Warning",
|
|
1866
|
+
title: "A block of memory shall only be freed if it was allocated by means of a Standard Library function",
|
|
1867
|
+
enabled: false,
|
|
1868
|
+
parameters: []
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
id: "cppcheck_misra-c2012-22.4",
|
|
1872
|
+
category: "ErrorProne",
|
|
1873
|
+
severityLevel: "Warning",
|
|
1874
|
+
title: "There shall be no attempt to write to a stream which has been opened as read-only",
|
|
1875
|
+
enabled: false,
|
|
1876
|
+
parameters: []
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
id: "cppcheck_misra-c2012-22.6",
|
|
1880
|
+
category: "ErrorProne",
|
|
1881
|
+
severityLevel: "Warning",
|
|
1882
|
+
title: "The value of a pointer to a FILE shall not be used after the associated stream has been closed",
|
|
1883
|
+
enabled: false,
|
|
1884
|
+
parameters: []
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
id: "cppcheck_misra-c2012-2.4",
|
|
1888
|
+
category: "ErrorProne",
|
|
1889
|
+
severityLevel: "Warning",
|
|
1890
|
+
title: "A project should not contain unused tag declarations",
|
|
1891
|
+
enabled: false,
|
|
1892
|
+
parameters: []
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
id: "cppcheck_misra-c2012-2.6",
|
|
1896
|
+
category: "ErrorProne",
|
|
1897
|
+
severityLevel: "Warning",
|
|
1898
|
+
title: "A function should not contain unused label declarations",
|
|
1899
|
+
enabled: false,
|
|
1900
|
+
parameters: []
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
id: "cppcheck_misra-c2012-3.1",
|
|
1904
|
+
category: "ErrorProne",
|
|
1905
|
+
severityLevel: "Warning",
|
|
1906
|
+
title: "The character sequences /* and // shall not be used within a comment",
|
|
1907
|
+
enabled: false,
|
|
1908
|
+
parameters: []
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
id: "cppcheck_misra-c2012-4.1",
|
|
1912
|
+
category: "ErrorProne",
|
|
1913
|
+
severityLevel: "Warning",
|
|
1914
|
+
title: "Octal and hexadecimal escape sequences shall be terminated",
|
|
1915
|
+
enabled: false,
|
|
1916
|
+
parameters: []
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
id: "cppcheck_misra-c2012-5.1",
|
|
1920
|
+
category: "ErrorProne",
|
|
1921
|
+
severityLevel: "Warning",
|
|
1922
|
+
title: "External identifiers shall be distinct",
|
|
1923
|
+
enabled: false,
|
|
1924
|
+
parameters: []
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
id: "cppcheck_misra-c2012-5.2",
|
|
1928
|
+
category: "ErrorProne",
|
|
1929
|
+
severityLevel: "Warning",
|
|
1930
|
+
title: "Identifiers declared in the same scope and name space shall be distinct",
|
|
1931
|
+
enabled: false,
|
|
1932
|
+
parameters: []
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
id: "cppcheck_misra-c2012-5.3",
|
|
1936
|
+
category: "ErrorProne",
|
|
1937
|
+
severityLevel: "Warning",
|
|
1938
|
+
title: "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope",
|
|
1939
|
+
enabled: false,
|
|
1940
|
+
parameters: []
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
id: "cppcheck_misra-c2012-5.4",
|
|
1944
|
+
category: "ErrorProne",
|
|
1945
|
+
severityLevel: "Warning",
|
|
1946
|
+
title: "Macro identifiers shall be distinct",
|
|
1947
|
+
enabled: false,
|
|
1948
|
+
parameters: []
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
id: "cppcheck_misra-c2012-5.5",
|
|
1952
|
+
category: "ErrorProne",
|
|
1953
|
+
severityLevel: "Warning",
|
|
1954
|
+
title: "Identifiers shall be distinct from macro names",
|
|
1955
|
+
enabled: false,
|
|
1956
|
+
parameters: []
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
id: "cppcheck_misra-c2012-7.1",
|
|
1960
|
+
category: "ErrorProne",
|
|
1961
|
+
severityLevel: "Warning",
|
|
1962
|
+
title: "Octal constants shall not be used",
|
|
1963
|
+
enabled: false,
|
|
1964
|
+
parameters: []
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
id: "cppcheck_misra-c2012-7.3",
|
|
1968
|
+
category: "ErrorProne",
|
|
1969
|
+
severityLevel: "Warning",
|
|
1970
|
+
title: "The lowercase character 'l' shall not be used in a literal suffix",
|
|
1971
|
+
enabled: false,
|
|
1972
|
+
parameters: []
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
id: "cppcheck_misra-c2012-8.11",
|
|
1976
|
+
category: "ErrorProne",
|
|
1977
|
+
severityLevel: "Warning",
|
|
1978
|
+
title: "When an array with external linkage is declared, its size should be explicitly specified",
|
|
1979
|
+
enabled: false,
|
|
1980
|
+
parameters: []
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
id: "cppcheck_misra-c2012-8.12",
|
|
1984
|
+
category: "ErrorProne",
|
|
1985
|
+
severityLevel: "Warning",
|
|
1986
|
+
title: "Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique",
|
|
1987
|
+
enabled: false,
|
|
1988
|
+
parameters: []
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
id: "cppcheck_misra-c2012-8.14",
|
|
1992
|
+
category: "ErrorProne",
|
|
1993
|
+
severityLevel: "Warning",
|
|
1994
|
+
title: "The restrict type qualifier shall not be used",
|
|
1995
|
+
enabled: false,
|
|
1996
|
+
parameters: []
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
id: "cppcheck_misra-c2012-8.3",
|
|
2000
|
+
category: "ErrorProne",
|
|
2001
|
+
severityLevel: "Warning",
|
|
2002
|
+
title: "All declarations of an object or function shall use the same names and type qualifiers",
|
|
2003
|
+
enabled: false,
|
|
2004
|
+
parameters: []
|
|
2005
|
+
},
|
|
2006
|
+
{
|
|
2007
|
+
id: "cppcheck_misra-c2012-9.5",
|
|
2008
|
+
category: "ErrorProne",
|
|
2009
|
+
severityLevel: "Warning",
|
|
2010
|
+
title: "Where designated initializers are used to initialize an array object the size of the array shall be specified explicitly",
|
|
2011
|
+
enabled: false,
|
|
2012
|
+
parameters: []
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
id: "cppcheck_missingInclude",
|
|
2016
|
+
category: "ErrorProne",
|
|
2017
|
+
severityLevel: "High",
|
|
2018
|
+
title: "Detect Missing Include Files",
|
|
2019
|
+
enabled: true,
|
|
2020
|
+
parameters: []
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
id: "cppcheck_missingIncludeSystem",
|
|
2024
|
+
category: "ErrorProne",
|
|
2025
|
+
severityLevel: "Warning",
|
|
2026
|
+
title: "Detect Missing System Include Files",
|
|
2027
|
+
enabled: true,
|
|
2028
|
+
parameters: []
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
id: "cppcheck_missingMemberCopy",
|
|
2032
|
+
category: "ErrorProne",
|
|
2033
|
+
severityLevel: "High",
|
|
2034
|
+
title: "Ensure Member Variables Are Assigned in Move Constructor",
|
|
2035
|
+
enabled: false,
|
|
2036
|
+
parameters: []
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
id: "cppcheck_missingOverride",
|
|
2040
|
+
category: "BestPractice",
|
|
2041
|
+
severityLevel: "Warning",
|
|
2042
|
+
title: "Enforce Use of 'override' Specifier on Overriding Functions",
|
|
2043
|
+
enabled: false,
|
|
2044
|
+
parameters: []
|
|
2045
|
+
},
|
|
2046
|
+
{
|
|
2047
|
+
id: "cppcheck_missingReturn",
|
|
2048
|
+
category: "ErrorProne",
|
|
2049
|
+
severityLevel: "Error",
|
|
2050
|
+
title: "Detect Missing Return Statement in Non-Void Functions",
|
|
2051
|
+
enabled: false,
|
|
2052
|
+
parameters: []
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
id: "cppcheck_moduloAlwaysTrueFalse",
|
|
2056
|
+
category: "ErrorProne",
|
|
2057
|
+
severityLevel: "High",
|
|
2058
|
+
title: "Avoid Predetermined Comparison of Modulo Result",
|
|
2059
|
+
enabled: true,
|
|
2060
|
+
parameters: []
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
id: "cppcheck_moduloofone",
|
|
2064
|
+
category: "CodeStyle",
|
|
2065
|
+
severityLevel: "Info",
|
|
2066
|
+
title: "Avoid Modulo Operation with Divisor One",
|
|
2067
|
+
enabled: false,
|
|
2068
|
+
parameters: []
|
|
2069
|
+
},
|
|
2070
|
+
{
|
|
2071
|
+
id: "cppcheck_multiCondition",
|
|
2072
|
+
category: "ErrorProne",
|
|
2073
|
+
severityLevel: "High",
|
|
2074
|
+
title: "Avoid Redundant Else-If Conditions",
|
|
2075
|
+
enabled: true,
|
|
2076
|
+
parameters: []
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
id: "cppcheck_multiplySizeof",
|
|
2080
|
+
category: "ErrorProne",
|
|
2081
|
+
severityLevel: "High",
|
|
2082
|
+
title: "Avoid Multiplying sizeof() with sizeof()",
|
|
2083
|
+
enabled: false,
|
|
2084
|
+
parameters: []
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
id: "cppcheck_nanInArithmeticExpression",
|
|
2088
|
+
category: "ErrorProne",
|
|
2089
|
+
severityLevel: "High",
|
|
2090
|
+
title: "Avoid Using NaN/Inf in Arithmetic Expressions",
|
|
2091
|
+
enabled: true,
|
|
2092
|
+
parameters: []
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
id: "cppcheck_negativeArraySize",
|
|
2096
|
+
category: "ErrorProne",
|
|
2097
|
+
severityLevel: "Error",
|
|
2098
|
+
title: "Avoid Declaration of Arrays with Negative Size",
|
|
2099
|
+
enabled: false,
|
|
2100
|
+
parameters: []
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
id: "cppcheck_negativeContainerIndex",
|
|
2104
|
+
category: "ErrorProne",
|
|
2105
|
+
severityLevel: "Error",
|
|
2106
|
+
title: "Avoid Array Index -1 Out of Bounds",
|
|
2107
|
+
enabled: false,
|
|
2108
|
+
parameters: []
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
id: "cppcheck_negativeIndex",
|
|
2112
|
+
category: "ErrorProne",
|
|
2113
|
+
severityLevel: "Error",
|
|
2114
|
+
title: "Avoid Negative Array Index",
|
|
2115
|
+
enabled: true,
|
|
2116
|
+
parameters: []
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
id: "cppcheck_negativeMemoryAllocationSize",
|
|
2120
|
+
category: "ErrorProne",
|
|
2121
|
+
severityLevel: "Error",
|
|
2122
|
+
title: "Avoid Negative Memory Allocation Size",
|
|
2123
|
+
enabled: false,
|
|
2124
|
+
parameters: []
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
id: "cppcheck_noConstructor",
|
|
2128
|
+
category: "ErrorProne",
|
|
2129
|
+
severityLevel: "High",
|
|
2130
|
+
title: "Enforce Declaration of Constructor for Classes with Private Members",
|
|
2131
|
+
enabled: true,
|
|
2132
|
+
parameters: []
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
id: "cppcheck_noCopyConstructor",
|
|
2136
|
+
category: "ErrorProne",
|
|
2137
|
+
severityLevel: "High",
|
|
2138
|
+
title: "Enforce Copy Constructor for Classes with Dynamic Memory Allocation",
|
|
2139
|
+
enabled: true,
|
|
2140
|
+
parameters: []
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
id: "cppcheck_noDestructor",
|
|
2144
|
+
category: "ErrorProne",
|
|
2145
|
+
severityLevel: "High",
|
|
2146
|
+
title: "Enforce Destructor for Classes with Dynamic Memory or Resource Allocation",
|
|
2147
|
+
enabled: false,
|
|
2148
|
+
parameters: []
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
id: "cppcheck_noExplicitConstructor",
|
|
2152
|
+
category: "ErrorProne",
|
|
2153
|
+
severityLevel: "High",
|
|
2154
|
+
title: "Enforce Explicit Single-Argument Constructors",
|
|
2155
|
+
enabled: true,
|
|
2156
|
+
parameters: []
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
id: "cppcheck_nonStandardCharLiteral",
|
|
2160
|
+
category: "ErrorProne",
|
|
2161
|
+
severityLevel: "High",
|
|
2162
|
+
title: "Avoid Non-Standard Character Literals",
|
|
2163
|
+
enabled: false,
|
|
2164
|
+
parameters: []
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
id: "cppcheck_noOperatorEq",
|
|
2168
|
+
category: "ErrorProne",
|
|
2169
|
+
severityLevel: "High",
|
|
2170
|
+
title: "Define Assignment Operator for Classes with Dynamic Resources",
|
|
2171
|
+
enabled: false,
|
|
2172
|
+
parameters: []
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
id: "cppcheck_nullPointer",
|
|
2176
|
+
category: "ErrorProne",
|
|
2177
|
+
severityLevel: "Error",
|
|
2178
|
+
title: "Avoid Null Pointer Dereference",
|
|
2179
|
+
enabled: true,
|
|
2180
|
+
parameters: []
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
id: "cppcheck_nullPointerArithmetic",
|
|
2184
|
+
category: "ErrorProne",
|
|
2185
|
+
severityLevel: "Error",
|
|
2186
|
+
title: "Avoid Pointer Arithmetic with NULL Pointer",
|
|
2187
|
+
enabled: false,
|
|
2188
|
+
parameters: []
|
|
2189
|
+
},
|
|
2190
|
+
{
|
|
2191
|
+
id: "cppcheck_nullPointerArithmeticRedundantCheck",
|
|
2192
|
+
category: "BestPractice",
|
|
2193
|
+
severityLevel: "Warning",
|
|
2194
|
+
title: "Avoid Redundant Null Pointer Checks",
|
|
2195
|
+
enabled: false,
|
|
2196
|
+
parameters: []
|
|
2197
|
+
},
|
|
2198
|
+
{
|
|
2199
|
+
id: "cppcheck_nullPointerDefaultArg",
|
|
2200
|
+
category: "ErrorProne",
|
|
2201
|
+
severityLevel: "High",
|
|
2202
|
+
title: "Avoid Possible Null Pointer Dereference Due to Default Pointer Parameter",
|
|
2203
|
+
enabled: true,
|
|
2204
|
+
parameters: []
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
id: "cppcheck_nullPointerOutOfMemory",
|
|
2208
|
+
category: "ErrorProne",
|
|
2209
|
+
severityLevel: "Error",
|
|
2210
|
+
title: "Avoid Null Pointer Dereference",
|
|
2211
|
+
enabled: false,
|
|
2212
|
+
parameters: []
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
id: "cppcheck_nullPointerOutOfResources",
|
|
2216
|
+
category: "ErrorProne",
|
|
2217
|
+
severityLevel: "Error",
|
|
2218
|
+
title: "Avoid Null Pointer Dereference",
|
|
2219
|
+
enabled: false,
|
|
2220
|
+
parameters: []
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
id: "cppcheck_nullPointerRedundantCheck",
|
|
2224
|
+
category: "ErrorProne",
|
|
2225
|
+
severityLevel: "High",
|
|
2226
|
+
title: "Avoid Redundant Null Pointer Checks",
|
|
2227
|
+
enabled: true,
|
|
2228
|
+
parameters: []
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
id: "cppcheck_objectIndex",
|
|
2232
|
+
category: "ErrorProne",
|
|
2233
|
+
severityLevel: "High",
|
|
2234
|
+
title: "Avoid Accessing Variable Address at Non-Zero Index",
|
|
2235
|
+
enabled: false,
|
|
2236
|
+
parameters: []
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
id: "cppcheck_operatorEqMissingReturnStatement",
|
|
2240
|
+
category: "ErrorProne",
|
|
2241
|
+
severityLevel: "Error",
|
|
2242
|
+
title: "Enforce return statement in non-void assignment operator",
|
|
2243
|
+
enabled: true,
|
|
2244
|
+
parameters: []
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
id: "cppcheck_operatorEqRetRefThis",
|
|
2248
|
+
category: "BestPractice",
|
|
2249
|
+
severityLevel: "Warning",
|
|
2250
|
+
title: "Enforce operator= to return reference to this instance",
|
|
2251
|
+
enabled: true,
|
|
2252
|
+
parameters: []
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
id: "cppcheck_operatorEqShouldBeLeftUnimplemented",
|
|
2256
|
+
category: "BestPractice",
|
|
2257
|
+
severityLevel: "Warning",
|
|
2258
|
+
title: "Ensure operator= returns reference to this or is private and unimplemented",
|
|
2259
|
+
enabled: true,
|
|
2260
|
+
parameters: []
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
id: "cppcheck_operatorEqToSelf",
|
|
2264
|
+
category: "ErrorProne",
|
|
2265
|
+
severityLevel: "High",
|
|
2266
|
+
title: "Enforce self-assignment check in operator=",
|
|
2267
|
+
enabled: true,
|
|
2268
|
+
parameters: []
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
id: "cppcheck_operatorEqVarError",
|
|
2272
|
+
category: "ErrorProne",
|
|
2273
|
+
severityLevel: "High",
|
|
2274
|
+
title: "Enforce Assignment of All Member Variables in operator=",
|
|
2275
|
+
enabled: true,
|
|
2276
|
+
parameters: []
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
id: "cppcheck_oppositeExpression",
|
|
2280
|
+
category: "ErrorProne",
|
|
2281
|
+
severityLevel: "High",
|
|
2282
|
+
title: "Detect Opposite Expressions on Both Sides of '&&' Operator",
|
|
2283
|
+
enabled: false,
|
|
2284
|
+
parameters: []
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
id: "cppcheck_oppositeInnerCondition",
|
|
2288
|
+
category: "ErrorProne",
|
|
2289
|
+
severityLevel: "High",
|
|
2290
|
+
title: "Avoid Opposite Inner If Conditions Leading to Dead Code",
|
|
2291
|
+
enabled: true,
|
|
2292
|
+
parameters: []
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
id: "cppcheck_overlappingStrcmp",
|
|
2296
|
+
category: "ErrorProne",
|
|
2297
|
+
severityLevel: "High",
|
|
2298
|
+
title: "Avoid Overlapping strcmp Expressions",
|
|
2299
|
+
enabled: false,
|
|
2300
|
+
parameters: []
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
id: "cppcheck_overlappingWriteFunction",
|
|
2304
|
+
category: "ErrorProne",
|
|
2305
|
+
severityLevel: "Error",
|
|
2306
|
+
title: "Avoid overlapping read/write in functions",
|
|
2307
|
+
enabled: false,
|
|
2308
|
+
parameters: []
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
id: "cppcheck_overlappingWriteUnion",
|
|
2312
|
+
category: "ErrorProne",
|
|
2313
|
+
severityLevel: "High",
|
|
2314
|
+
title: "Avoid Overlapping Read/Write of Union Members",
|
|
2315
|
+
enabled: false,
|
|
2316
|
+
parameters: []
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
id: "cppcheck_passedByValue",
|
|
2320
|
+
category: "Performance",
|
|
2321
|
+
severityLevel: "Warning",
|
|
2322
|
+
title: "Enforce Passing Function Parameters by Const Reference",
|
|
2323
|
+
enabled: true,
|
|
2324
|
+
parameters: []
|
|
2325
|
+
},
|
|
2326
|
+
{
|
|
2327
|
+
id: "cppcheck_pointerAdditionResultNotNull",
|
|
2328
|
+
category: "ErrorProne",
|
|
2329
|
+
severityLevel: "High",
|
|
2330
|
+
title: "Avoid Comparing Pointer Arithmetic Result to Null",
|
|
2331
|
+
enabled: false,
|
|
2332
|
+
parameters: []
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
id: "cppcheck_pointerArithBool",
|
|
2336
|
+
category: "ErrorProne",
|
|
2337
|
+
severityLevel: "High",
|
|
2338
|
+
title: "Avoid Converting Pointer Arithmetic Result to Bool",
|
|
2339
|
+
enabled: true,
|
|
2340
|
+
parameters: []
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
id: "cppcheck_pointerLessThanZero",
|
|
2344
|
+
category: "ErrorProne",
|
|
2345
|
+
severityLevel: "High",
|
|
2346
|
+
title: "Avoid Checking if Pointer is Less Than Zero",
|
|
2347
|
+
enabled: true,
|
|
2348
|
+
parameters: []
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
id: "cppcheck_pointerOutOfBounds",
|
|
2352
|
+
category: "ErrorProne",
|
|
2353
|
+
severityLevel: "Error",
|
|
2354
|
+
title: "Avoid Pointer Arithmetic Overflow",
|
|
2355
|
+
enabled: true,
|
|
2356
|
+
parameters: []
|
|
2357
|
+
},
|
|
2358
|
+
{
|
|
2359
|
+
id: "cppcheck_pointerOutOfBoundsCond",
|
|
2360
|
+
category: "ErrorProne",
|
|
2361
|
+
severityLevel: "High",
|
|
2362
|
+
title: "Avoid Pointer Arithmetic Overflow",
|
|
2363
|
+
enabled: false,
|
|
2364
|
+
parameters: []
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
id: "cppcheck_pointerPositive",
|
|
2368
|
+
category: "ErrorProne",
|
|
2369
|
+
severityLevel: "Warning",
|
|
2370
|
+
title: "Avoid Checking if a Pointer is Negative",
|
|
2371
|
+
enabled: true,
|
|
2372
|
+
parameters: []
|
|
2373
|
+
},
|
|
2374
|
+
{
|
|
2375
|
+
id: "cppcheck_pointerSize",
|
|
2376
|
+
category: "ErrorProne",
|
|
2377
|
+
severityLevel: "Error",
|
|
2378
|
+
title: "Avoid Using Size of Pointer Instead of Size of Its Data",
|
|
2379
|
+
enabled: true,
|
|
2380
|
+
parameters: []
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
id: "cppcheck_postfixOperator",
|
|
2384
|
+
category: "Performance",
|
|
2385
|
+
severityLevel: "Warning",
|
|
2386
|
+
title: "Prefer prefix ++/-- operators for non-primitive types",
|
|
2387
|
+
enabled: true,
|
|
2388
|
+
parameters: []
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
id: "cppcheck_preprocessorErrorDirective",
|
|
2392
|
+
category: "ErrorProne",
|
|
2393
|
+
severityLevel: "Warning",
|
|
2394
|
+
title: "Avoid #error Preprocessor Directive",
|
|
2395
|
+
enabled: true,
|
|
2396
|
+
parameters: []
|
|
2397
|
+
},
|
|
2398
|
+
{
|
|
2399
|
+
id: "cppcheck_publicAllocationError",
|
|
2400
|
+
category: "ErrorProne",
|
|
2401
|
+
severityLevel: "High",
|
|
2402
|
+
title: "Avoid Memory Leak in Public Function by Proper Pointer Deallocation",
|
|
2403
|
+
enabled: true,
|
|
2404
|
+
parameters: []
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
id: "cppcheck_pureVirtualCall",
|
|
2408
|
+
category: "ErrorProne",
|
|
2409
|
+
severityLevel: "High",
|
|
2410
|
+
title: "Avoid Calling Pure Virtual Functions in Constructors",
|
|
2411
|
+
enabled: false,
|
|
2412
|
+
parameters: []
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
id: "cppcheck_purgedConfiguration",
|
|
2416
|
+
category: "BestPractice",
|
|
2417
|
+
severityLevel: "Info",
|
|
2418
|
+
title: "Avoid Duplicate Configuration Checks",
|
|
2419
|
+
enabled: false,
|
|
2420
|
+
parameters: []
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
id: "cppcheck_raceAfterInterlockedDecrement",
|
|
2424
|
+
category: "ErrorProne",
|
|
2425
|
+
severityLevel: "Error",
|
|
2426
|
+
title: "Avoid Race Condition by Using InterlockedDecrement Return Value",
|
|
2427
|
+
enabled: true,
|
|
2428
|
+
parameters: []
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
id: "cppcheck_readWriteOnlyFile",
|
|
2432
|
+
category: "ErrorProne",
|
|
2433
|
+
severityLevel: "High",
|
|
2434
|
+
title: "Avoid Read Operation on Write-Only File",
|
|
2435
|
+
enabled: true,
|
|
2436
|
+
parameters: []
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
id: "cppcheck_redundantAssignInSwitch",
|
|
2440
|
+
category: "ErrorProne",
|
|
2441
|
+
severityLevel: "High",
|
|
2442
|
+
title: "Avoid Redundant Variable Assignment in Switch Cases",
|
|
2443
|
+
enabled: true,
|
|
2444
|
+
parameters: []
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
id: "cppcheck_redundantAssignment",
|
|
2448
|
+
category: "BestPractice",
|
|
2449
|
+
severityLevel: "Warning",
|
|
2450
|
+
title: "Avoid Redundant Variable Assignments",
|
|
2451
|
+
enabled: true,
|
|
2452
|
+
parameters: []
|
|
2453
|
+
},
|
|
2454
|
+
{
|
|
2455
|
+
id: "cppcheck_redundantBitwiseOperationInSwitch",
|
|
2456
|
+
category: "ErrorProne",
|
|
2457
|
+
severityLevel: "Warning",
|
|
2458
|
+
title: "Avoid Redundant Bitwise Operations in Switch Statements",
|
|
2459
|
+
enabled: false,
|
|
2460
|
+
parameters: []
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
id: "cppcheck_redundantCondition",
|
|
2464
|
+
category: "CodeStyle",
|
|
2465
|
+
severityLevel: "Info",
|
|
2466
|
+
title: "Avoid Redundant Conditions",
|
|
2467
|
+
enabled: true,
|
|
2468
|
+
parameters: []
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
id: "cppcheck_redundantCopy",
|
|
2472
|
+
category: "Performance",
|
|
2473
|
+
severityLevel: "Warning",
|
|
2474
|
+
title: "Avoid Redundant Buffer Copies or Assignments",
|
|
2475
|
+
enabled: true,
|
|
2476
|
+
parameters: []
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
id: "cppcheck_redundantCopyLocalConst",
|
|
2480
|
+
category: "Performance",
|
|
2481
|
+
severityLevel: "Warning",
|
|
2482
|
+
title: "Use const reference to avoid unnecessary data copying",
|
|
2483
|
+
enabled: false,
|
|
2484
|
+
parameters: []
|
|
2485
|
+
},
|
|
2486
|
+
{
|
|
2487
|
+
id: "cppcheck_redundantIfRemove",
|
|
2488
|
+
category: "BestPractice",
|
|
2489
|
+
severityLevel: "Warning",
|
|
2490
|
+
title: "Avoid Redundant Existence Check Before Removing STL Container Element",
|
|
2491
|
+
enabled: true,
|
|
2492
|
+
parameters: []
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
id: "cppcheck_redundantInitialization",
|
|
2496
|
+
category: "Performance",
|
|
2497
|
+
severityLevel: "Info",
|
|
2498
|
+
title: "Avoid Redundant Initialization",
|
|
2499
|
+
enabled: false,
|
|
2500
|
+
parameters: []
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
id: "cppcheck_redundantPointerOp",
|
|
2504
|
+
category: "ErrorProne",
|
|
2505
|
+
severityLevel: "Warning",
|
|
2506
|
+
title: "Avoid Redundant Pointer Operations",
|
|
2507
|
+
enabled: true,
|
|
2508
|
+
parameters: []
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
id: "cppcheck_resourceLeak",
|
|
2512
|
+
category: "ErrorProne",
|
|
2513
|
+
severityLevel: "High",
|
|
2514
|
+
title: "Avoid Resource Leaks",
|
|
2515
|
+
enabled: true,
|
|
2516
|
+
parameters: []
|
|
2517
|
+
},
|
|
2518
|
+
{
|
|
2519
|
+
id: "cppcheck_rethrowNoCurrentException",
|
|
2520
|
+
category: "ErrorProne",
|
|
2521
|
+
severityLevel: "Error",
|
|
2522
|
+
title: "Avoid Rethrowing Exceptions When No Current Exception Exists",
|
|
2523
|
+
enabled: false,
|
|
2524
|
+
parameters: []
|
|
2525
|
+
},
|
|
2526
|
+
{
|
|
2527
|
+
id: "cppcheck_returnByReference",
|
|
2528
|
+
category: "Performance",
|
|
2529
|
+
severityLevel: "Warning",
|
|
2530
|
+
title: "Enforce Returning Member Variables by Const Reference",
|
|
2531
|
+
enabled: false,
|
|
2532
|
+
parameters: []
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
id: "cppcheck_returnDanglingLifetime",
|
|
2536
|
+
category: "ErrorProne",
|
|
2537
|
+
severityLevel: "Error",
|
|
2538
|
+
title: "Avoid Returning Objects with Dangling Lifetime",
|
|
2539
|
+
enabled: false,
|
|
2540
|
+
parameters: []
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
id: "cppcheck_returnNonBoolInBooleanFunction",
|
|
2544
|
+
category: "ErrorProne",
|
|
2545
|
+
severityLevel: "High",
|
|
2546
|
+
title: "Avoid Returning Non-Boolean Values from Functions Declared to Return bool",
|
|
2547
|
+
enabled: false,
|
|
2548
|
+
parameters: []
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
id: "cppcheck_returnReference",
|
|
2552
|
+
category: "ErrorProne",
|
|
2553
|
+
severityLevel: "Error",
|
|
2554
|
+
title: "Avoid Returning Reference to Local Variable",
|
|
2555
|
+
enabled: true,
|
|
2556
|
+
parameters: []
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
id: "cppcheck_returnStdMoveLocal",
|
|
2560
|
+
category: "Performance",
|
|
2561
|
+
severityLevel: "Warning",
|
|
2562
|
+
title: "Avoid using std::move when returning local objects by value",
|
|
2563
|
+
enabled: false,
|
|
2564
|
+
parameters: []
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
id: "cppcheck_returnTempReference",
|
|
2568
|
+
category: "Performance",
|
|
2569
|
+
severityLevel: "Warning",
|
|
2570
|
+
title: "Avoid Using std::move When Returning Local Objects by Value",
|
|
2571
|
+
enabled: true,
|
|
2572
|
+
parameters: []
|
|
2573
|
+
},
|
|
2574
|
+
{
|
|
2575
|
+
id: "cppcheck_sameIteratorExpression",
|
|
2576
|
+
category: "ErrorProne",
|
|
2577
|
+
severityLevel: "High",
|
|
2578
|
+
title: "Avoid Using Same Iterators Expression for Algorithm",
|
|
2579
|
+
enabled: false,
|
|
2580
|
+
parameters: []
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
id: "cppcheck_seekOnAppendedFile",
|
|
2584
|
+
category: "ErrorProne",
|
|
2585
|
+
severityLevel: "Warning",
|
|
2586
|
+
title: "Avoid Repositioning Operations on Files Opened in Append Mode",
|
|
2587
|
+
enabled: true,
|
|
2588
|
+
parameters: []
|
|
2589
|
+
},
|
|
2590
|
+
{
|
|
2591
|
+
id: "cppcheck_selfAssignment",
|
|
2592
|
+
category: "CodeStyle",
|
|
2593
|
+
severityLevel: "Info",
|
|
2594
|
+
title: "Avoid Redundant Self-Assignment",
|
|
2595
|
+
enabled: true,
|
|
2596
|
+
parameters: []
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
id: "cppcheck_selfInitialization",
|
|
2600
|
+
category: "ErrorProne",
|
|
2601
|
+
severityLevel: "High",
|
|
2602
|
+
title: "Avoid Self-Initialization of Member Variables",
|
|
2603
|
+
enabled: true,
|
|
2604
|
+
parameters: []
|
|
2605
|
+
},
|
|
2606
|
+
{
|
|
2607
|
+
id: "cppcheck_shadowArgument",
|
|
2608
|
+
category: "CodeStyle",
|
|
2609
|
+
severityLevel: "Info",
|
|
2610
|
+
title: "Avoid Local Variable Shadowing Outer Argument",
|
|
2611
|
+
enabled: false,
|
|
2612
|
+
parameters: []
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
id: "cppcheck_shadowFunction",
|
|
2616
|
+
category: "ErrorProne",
|
|
2617
|
+
severityLevel: "Warning",
|
|
2618
|
+
title: "Avoid Local Variable Shadowing Outer Function",
|
|
2619
|
+
enabled: false,
|
|
2620
|
+
parameters: []
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
id: "cppcheck_shadowVariable",
|
|
2624
|
+
category: "BestPractice",
|
|
2625
|
+
severityLevel: "Warning",
|
|
2626
|
+
title: "Avoid Shadowing Outer Variables with Local Variables",
|
|
2627
|
+
enabled: false,
|
|
2628
|
+
parameters: []
|
|
2629
|
+
},
|
|
2630
|
+
{
|
|
2631
|
+
id: "cppcheck_shiftNegative",
|
|
2632
|
+
category: "ErrorProne",
|
|
2633
|
+
severityLevel: "Error",
|
|
2634
|
+
title: "Avoid Shifting by a Negative Value",
|
|
2635
|
+
enabled: true,
|
|
2636
|
+
parameters: []
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
id: "cppcheck_shiftNegativeLHS",
|
|
2640
|
+
category: "ErrorProne",
|
|
2641
|
+
severityLevel: "Error",
|
|
2642
|
+
title: "Avoid Shifting a Negative Value",
|
|
2643
|
+
enabled: false,
|
|
2644
|
+
parameters: []
|
|
2645
|
+
},
|
|
2646
|
+
{
|
|
2647
|
+
id: "cppcheck_shiftTooManyBits",
|
|
2648
|
+
category: "ErrorProne",
|
|
2649
|
+
severityLevel: "Error",
|
|
2650
|
+
title: "Avoid Shifting 32-bit Values by More than 31 Bits",
|
|
2651
|
+
enabled: true,
|
|
2652
|
+
parameters: []
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
id: "cppcheck_shiftTooManyBitsSigned",
|
|
2656
|
+
category: "ErrorProne",
|
|
2657
|
+
severityLevel: "High",
|
|
2658
|
+
title: "Avoid Shifting Signed 32-bit Value by 31 Bits",
|
|
2659
|
+
enabled: false,
|
|
2660
|
+
parameters: []
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
id: "cppcheck_signConversion",
|
|
2664
|
+
category: "ErrorProne",
|
|
2665
|
+
severityLevel: "High",
|
|
2666
|
+
title: "Avoid Implicit Signed to Unsigned Conversion in Calculations",
|
|
2667
|
+
enabled: true,
|
|
2668
|
+
parameters: []
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
id: "cppcheck_signedCharArrayIndex",
|
|
2672
|
+
category: "ErrorProne",
|
|
2673
|
+
severityLevel: "High",
|
|
2674
|
+
title: "Avoid Using Signed 'char' as Array Index",
|
|
2675
|
+
enabled: false,
|
|
2676
|
+
parameters: []
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
id: "cppcheck_sizeofCalculation",
|
|
2680
|
+
category: "ErrorProne",
|
|
2681
|
+
severityLevel: "Warning",
|
|
2682
|
+
title: "Avoid Calculations Inside sizeof()",
|
|
2683
|
+
enabled: true,
|
|
2684
|
+
parameters: []
|
|
2685
|
+
},
|
|
2686
|
+
{
|
|
2687
|
+
id: "cppcheck_sizeofDereferencedVoidPointer",
|
|
2688
|
+
category: "ErrorProne",
|
|
2689
|
+
severityLevel: "High",
|
|
2690
|
+
title: "Avoid Using sizeof on Dereferenced Void Pointer",
|
|
2691
|
+
enabled: true,
|
|
2692
|
+
parameters: []
|
|
2693
|
+
},
|
|
2694
|
+
{
|
|
2695
|
+
id: "cppcheck_sizeofDivisionMemfunc",
|
|
2696
|
+
category: "ErrorProne",
|
|
2697
|
+
severityLevel: "High",
|
|
2698
|
+
title: "Avoid Division by Result of sizeof() in memset()",
|
|
2699
|
+
enabled: true,
|
|
2700
|
+
parameters: []
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
id: "cppcheck_sizeofFunctionCall",
|
|
2704
|
+
category: "ErrorProne",
|
|
2705
|
+
severityLevel: "High",
|
|
2706
|
+
title: "Avoid Function Call Inside sizeof()",
|
|
2707
|
+
enabled: false,
|
|
2708
|
+
parameters: []
|
|
2709
|
+
},
|
|
2710
|
+
{
|
|
2711
|
+
id: "cppcheck_sizeofsizeof",
|
|
2712
|
+
category: "ErrorProne",
|
|
2713
|
+
severityLevel: "Warning",
|
|
2714
|
+
title: "Avoid Calling sizeof on sizeof",
|
|
2715
|
+
enabled: true,
|
|
2716
|
+
parameters: []
|
|
2717
|
+
},
|
|
2718
|
+
{
|
|
2719
|
+
id: "cppcheck_sizeofVoid",
|
|
2720
|
+
category: "Compatibility",
|
|
2721
|
+
severityLevel: "Warning",
|
|
2722
|
+
title: "Avoid Using sizeof(void)",
|
|
2723
|
+
enabled: true,
|
|
2724
|
+
parameters: []
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
id: "cppcheck_sizeofwithnumericparameter",
|
|
2728
|
+
category: "ErrorProne",
|
|
2729
|
+
severityLevel: "Warning",
|
|
2730
|
+
title: "Avoid Suspicious Usage of 'sizeof' with a Numeric Constant",
|
|
2731
|
+
enabled: true,
|
|
2732
|
+
parameters: []
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
id: "cppcheck_sizeofwithsilentarraypointer",
|
|
2736
|
+
category: "ErrorProne",
|
|
2737
|
+
severityLevel: "High",
|
|
2738
|
+
title: "Avoid Using sizeof on Array Function Arguments",
|
|
2739
|
+
enabled: true,
|
|
2740
|
+
parameters: []
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
id: "cppcheck_sprintfOverlappingData",
|
|
2744
|
+
category: "Security",
|
|
2745
|
+
severityLevel: "Error",
|
|
2746
|
+
title: "Avoid using the same variable as both parameter and destination in sprintf/snprintf",
|
|
2747
|
+
enabled: true,
|
|
2748
|
+
parameters: []
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
id: "cppcheck_staticStringCompare",
|
|
2752
|
+
category: "Performance",
|
|
2753
|
+
severityLevel: "Warning",
|
|
2754
|
+
title: "Avoid Unnecessary Comparison of Static Strings",
|
|
2755
|
+
enabled: true,
|
|
2756
|
+
parameters: []
|
|
2757
|
+
},
|
|
2758
|
+
{
|
|
2759
|
+
id: "cppcheck_stlBoundaries",
|
|
2760
|
+
category: "ErrorProne",
|
|
2761
|
+
severityLevel: "High",
|
|
2762
|
+
title: "Avoid Dangerous Comparison Using Operator < on Iterators",
|
|
2763
|
+
enabled: true,
|
|
2764
|
+
parameters: []
|
|
2765
|
+
},
|
|
2766
|
+
{
|
|
2767
|
+
id: "cppcheck_stlcstr",
|
|
2768
|
+
category: "ErrorProne",
|
|
2769
|
+
severityLevel: "High",
|
|
2770
|
+
title: "Avoid dangerous usage of c_str() after exception throws",
|
|
2771
|
+
enabled: true,
|
|
2772
|
+
parameters: []
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
id: "cppcheck_stlcstrParam",
|
|
2776
|
+
category: "Performance",
|
|
2777
|
+
severityLevel: "Info",
|
|
2778
|
+
title: "Avoid Passing c_str() Result to Functions Taking std::string",
|
|
2779
|
+
enabled: true,
|
|
2780
|
+
parameters: []
|
|
2781
|
+
},
|
|
2782
|
+
{
|
|
2783
|
+
id: "cppcheck_stlcstrReturn",
|
|
2784
|
+
category: "Performance",
|
|
2785
|
+
severityLevel: "Warning",
|
|
2786
|
+
title: "Avoid Returning c_str() Result in Functions Returning std::string",
|
|
2787
|
+
enabled: true,
|
|
2788
|
+
parameters: []
|
|
2789
|
+
},
|
|
2790
|
+
{
|
|
2791
|
+
id: "cppcheck_stlcstrthrow",
|
|
2792
|
+
category: "ErrorProne",
|
|
2793
|
+
severityLevel: "High",
|
|
2794
|
+
title: "Avoid Dangerous Usage of c_str() After Throwing Exception",
|
|
2795
|
+
enabled: false,
|
|
2796
|
+
parameters: []
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
id: "cppcheck_stlFindInsert",
|
|
2800
|
+
category: "Performance",
|
|
2801
|
+
severityLevel: "Warning",
|
|
2802
|
+
title: "Avoid Searching Before Insertion",
|
|
2803
|
+
enabled: false,
|
|
2804
|
+
parameters: []
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
id: "cppcheck_stlIfFind",
|
|
2808
|
+
category: "ErrorProne",
|
|
2809
|
+
severityLevel: "High",
|
|
2810
|
+
title: "Properly Check the Result of find()",
|
|
2811
|
+
enabled: true,
|
|
2812
|
+
parameters: []
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
id: "cppcheck_stlIfStrFind",
|
|
2816
|
+
category: "Performance",
|
|
2817
|
+
severityLevel: "Warning",
|
|
2818
|
+
title: "Avoid Inefficient Usage of string::find() in Condition; Use string::starts_with() Instead",
|
|
2819
|
+
enabled: true,
|
|
2820
|
+
parameters: []
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
id: "cppcheck_StlMissingComparison",
|
|
2824
|
+
category: "ErrorProne",
|
|
2825
|
+
severityLevel: "High",
|
|
2826
|
+
title: "Enforce bounds check for iterator increments in loops",
|
|
2827
|
+
enabled: true,
|
|
2828
|
+
parameters: []
|
|
2829
|
+
},
|
|
2830
|
+
{
|
|
2831
|
+
id: "cppcheck_stlOutOfBounds",
|
|
2832
|
+
category: "ErrorProne",
|
|
2833
|
+
severityLevel: "Error",
|
|
2834
|
+
title: "Avoid Out-of-Bounds Access in STL Containers",
|
|
2835
|
+
enabled: true,
|
|
2836
|
+
parameters: []
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
id: "cppcheck_stlSize",
|
|
2840
|
+
category: "Performance",
|
|
2841
|
+
severityLevel: "Warning",
|
|
2842
|
+
title: "Avoid inefficient checking for list emptiness",
|
|
2843
|
+
enabled: true,
|
|
2844
|
+
parameters: []
|
|
2845
|
+
},
|
|
2846
|
+
{
|
|
2847
|
+
id: "cppcheck_stringCompare",
|
|
2848
|
+
category: "ErrorProne",
|
|
2849
|
+
severityLevel: "Warning",
|
|
2850
|
+
title: "Avoid Comparison of Identical String Variables",
|
|
2851
|
+
enabled: true,
|
|
2852
|
+
parameters: []
|
|
2853
|
+
},
|
|
2854
|
+
{
|
|
2855
|
+
id: "cppcheck_stringLiteralWrite",
|
|
2856
|
+
category: "ErrorProne",
|
|
2857
|
+
severityLevel: "High",
|
|
2858
|
+
title: "Avoid Modifying String Literals",
|
|
2859
|
+
enabled: true,
|
|
2860
|
+
parameters: []
|
|
2861
|
+
},
|
|
2862
|
+
{
|
|
2863
|
+
id: "cppcheck_strPlusChar",
|
|
2864
|
+
category: "ErrorProne",
|
|
2865
|
+
severityLevel: "High",
|
|
2866
|
+
title: "Avoid Adding a Char to a String Literal Pointer",
|
|
2867
|
+
enabled: true,
|
|
2868
|
+
parameters: []
|
|
2869
|
+
},
|
|
2870
|
+
{
|
|
2871
|
+
id: "cppcheck_suspiciousCase",
|
|
2872
|
+
category: "ErrorProne",
|
|
2873
|
+
severityLevel: "High",
|
|
2874
|
+
title: "Avoid Suspicious Case Labels in Switch Statements",
|
|
2875
|
+
enabled: false,
|
|
2876
|
+
parameters: []
|
|
2877
|
+
},
|
|
2878
|
+
{
|
|
2879
|
+
id: "cppcheck_suspiciousFloatingPointCast",
|
|
2880
|
+
category: "ErrorProne",
|
|
2881
|
+
severityLevel: "Warning",
|
|
2882
|
+
title: "Avoid Floating-Point Casts That Cause Loss of Precision",
|
|
2883
|
+
enabled: false,
|
|
2884
|
+
parameters: []
|
|
2885
|
+
},
|
|
2886
|
+
{
|
|
2887
|
+
id: "cppcheck_suspiciousSemicolon",
|
|
2888
|
+
category: "ErrorProne",
|
|
2889
|
+
severityLevel: "High",
|
|
2890
|
+
title: "Avoid Suspicious Semicolon After Macro",
|
|
2891
|
+
enabled: false,
|
|
2892
|
+
parameters: []
|
|
2893
|
+
},
|
|
2894
|
+
{
|
|
2895
|
+
id: "cppcheck_thisSubtraction",
|
|
2896
|
+
category: "ErrorProne",
|
|
2897
|
+
severityLevel: "High",
|
|
2898
|
+
title: "Avoid Suspicious Pointer Subtraction (Did you intend to write '->'?)",
|
|
2899
|
+
enabled: true,
|
|
2900
|
+
parameters: []
|
|
2901
|
+
},
|
|
2902
|
+
{
|
|
2903
|
+
id: "cppcheck_thisUseAfterFree",
|
|
2904
|
+
category: "ErrorProne",
|
|
2905
|
+
severityLevel: "Error",
|
|
2906
|
+
title: "Avoid Using Member When 'this' Might Be Invalid",
|
|
2907
|
+
enabled: false,
|
|
2908
|
+
parameters: []
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
id: "cppcheck_threadsafety-threadsafety",
|
|
2912
|
+
category: "ErrorProne",
|
|
2913
|
+
severityLevel: "Warning",
|
|
2914
|
+
title: "Locate for threadsafety issues",
|
|
2915
|
+
enabled: false,
|
|
2916
|
+
parameters: []
|
|
2917
|
+
},
|
|
2918
|
+
{
|
|
2919
|
+
id: "cppcheck_throwInNoexceptFunction",
|
|
2920
|
+
category: "ErrorProne",
|
|
2921
|
+
severityLevel: "High",
|
|
2922
|
+
title: "Avoid throwing exceptions in functions declared noexcept",
|
|
2923
|
+
enabled: true,
|
|
2924
|
+
parameters: []
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
id: "cppcheck_toomanyconfigs",
|
|
2928
|
+
category: "Complexity",
|
|
2929
|
+
severityLevel: "Warning",
|
|
2930
|
+
title: "Avoid Too Many #ifdef Configurations",
|
|
2931
|
+
enabled: true,
|
|
2932
|
+
parameters: []
|
|
2933
|
+
},
|
|
2934
|
+
{
|
|
2935
|
+
id: "cppcheck_truncLongCastAssignment",
|
|
2936
|
+
category: "ErrorProne",
|
|
2937
|
+
severityLevel: "High",
|
|
2938
|
+
title: "Avoid Loss of Information by Proper Casting in Long Assignments",
|
|
2939
|
+
enabled: true,
|
|
2940
|
+
parameters: []
|
|
2941
|
+
},
|
|
2942
|
+
{
|
|
2943
|
+
id: "cppcheck_truncLongCastReturn",
|
|
2944
|
+
category: "ErrorProne",
|
|
2945
|
+
severityLevel: "High",
|
|
2946
|
+
title: "Avoid Loss of Information by Proper Casting in Return Statements",
|
|
2947
|
+
enabled: true,
|
|
2948
|
+
parameters: []
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
id: "cppcheck_unassignedVariable",
|
|
2952
|
+
category: "ErrorProne",
|
|
2953
|
+
severityLevel: "High",
|
|
2954
|
+
title: "Avoid Unassigned Variables",
|
|
2955
|
+
enabled: true,
|
|
2956
|
+
parameters: []
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
id: "cppcheck_unhandledExceptionSpecification",
|
|
2960
|
+
category: "ErrorProne",
|
|
2961
|
+
severityLevel: "High",
|
|
2962
|
+
title: "Handle Exception Specification When Calling Function",
|
|
2963
|
+
enabled: false,
|
|
2964
|
+
parameters: []
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
id: "cppcheck_uninitdata",
|
|
2968
|
+
category: "ErrorProne",
|
|
2969
|
+
severityLevel: "Error",
|
|
2970
|
+
title: "Avoid Using Uninitialized Variables",
|
|
2971
|
+
enabled: true,
|
|
2972
|
+
parameters: []
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
id: "cppcheck_uninitDerivedMemberVar",
|
|
2976
|
+
category: "ErrorProne",
|
|
2977
|
+
severityLevel: "High",
|
|
2978
|
+
title: "Initialize Member Variables in Constructor or Inline",
|
|
2979
|
+
enabled: false,
|
|
2980
|
+
parameters: []
|
|
2981
|
+
},
|
|
2982
|
+
{
|
|
2983
|
+
id: "cppcheck_uninitDerivedMemberVarPrivate",
|
|
2984
|
+
category: "ErrorProne",
|
|
2985
|
+
severityLevel: "High",
|
|
2986
|
+
title: "Initialize Member Variables in Constructor or Class",
|
|
2987
|
+
enabled: false,
|
|
2988
|
+
parameters: []
|
|
2989
|
+
},
|
|
2990
|
+
{
|
|
2991
|
+
id: "cppcheck_uninitMemberVar",
|
|
2992
|
+
category: "ErrorProne",
|
|
2993
|
+
severityLevel: "High",
|
|
2994
|
+
title: "Avoid Uninitialized Member Variables in Constructor",
|
|
2995
|
+
enabled: true,
|
|
2996
|
+
parameters: []
|
|
2997
|
+
},
|
|
2998
|
+
{
|
|
2999
|
+
id: "cppcheck_uninitMemberVarPrivate",
|
|
3000
|
+
category: "ErrorProne",
|
|
3001
|
+
severityLevel: "High",
|
|
3002
|
+
title: "Avoid Uninitialized Private Member Variables in Constructor",
|
|
3003
|
+
enabled: false,
|
|
3004
|
+
parameters: []
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
id: "cppcheck_uninitStructMember",
|
|
3008
|
+
category: "ErrorProne",
|
|
3009
|
+
severityLevel: "Error",
|
|
3010
|
+
title: "Avoid Uninitialized Struct Members",
|
|
3011
|
+
enabled: true,
|
|
3012
|
+
parameters: []
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
id: "cppcheck_unknownEvaluationOrder",
|
|
3016
|
+
category: "ErrorProne",
|
|
3017
|
+
severityLevel: "High",
|
|
3018
|
+
title: "Avoid Expressions Depending on Order of Evaluation of Side Effects",
|
|
3019
|
+
enabled: false,
|
|
3020
|
+
parameters: []
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
id: "cppcheck_unknownSignCharArrayIndex",
|
|
3024
|
+
category: "ErrorProne",
|
|
3025
|
+
severityLevel: "High",
|
|
3026
|
+
title: "Avoid Using 'char' Type as Array Index",
|
|
3027
|
+
enabled: false,
|
|
3028
|
+
parameters: []
|
|
3029
|
+
},
|
|
3030
|
+
{
|
|
3031
|
+
id: "cppcheck_unpreciseMathCall",
|
|
3032
|
+
category: "ErrorProne",
|
|
3033
|
+
severityLevel: "High",
|
|
3034
|
+
title: "Replace '1 - erf(x)' with 'erfc(x)' to Avoid Loss of Precision",
|
|
3035
|
+
enabled: true,
|
|
3036
|
+
parameters: []
|
|
3037
|
+
},
|
|
3038
|
+
{
|
|
3039
|
+
id: "cppcheck_unreachableCode",
|
|
3040
|
+
category: "ErrorProne",
|
|
3041
|
+
severityLevel: "Warning",
|
|
3042
|
+
title: "Avoid Unreachable Code",
|
|
3043
|
+
enabled: true,
|
|
3044
|
+
parameters: []
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
id: "cppcheck_unreadVariable",
|
|
3048
|
+
category: "UnusedCode",
|
|
3049
|
+
severityLevel: "Warning",
|
|
3050
|
+
title: "Detect Unused Variable Assignments",
|
|
3051
|
+
enabled: true,
|
|
3052
|
+
parameters: []
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
id: "cppcheck_unsafeClassCanLeak",
|
|
3056
|
+
category: "ErrorProne",
|
|
3057
|
+
severityLevel: "High",
|
|
3058
|
+
title: "Avoid Unsafe Class Memory Leaks",
|
|
3059
|
+
enabled: true,
|
|
3060
|
+
parameters: []
|
|
3061
|
+
},
|
|
3062
|
+
{
|
|
3063
|
+
id: "cppcheck_unsafeClassRefMember",
|
|
3064
|
+
category: "ErrorProne",
|
|
3065
|
+
severityLevel: "High",
|
|
3066
|
+
title: "Avoid unsafe const reference class members initialized from constructor const reference arguments",
|
|
3067
|
+
enabled: false,
|
|
3068
|
+
parameters: []
|
|
3069
|
+
},
|
|
3070
|
+
{
|
|
3071
|
+
id: "cppcheck_unsignedLessThanZero",
|
|
3072
|
+
category: "ErrorProne",
|
|
3073
|
+
severityLevel: "High",
|
|
3074
|
+
title: "Avoid Checking Unsigned Expressions for Less Than Zero",
|
|
3075
|
+
enabled: true,
|
|
3076
|
+
parameters: []
|
|
3077
|
+
},
|
|
3078
|
+
{
|
|
3079
|
+
id: "cppcheck_unsignedPositive",
|
|
3080
|
+
category: "ErrorProne",
|
|
3081
|
+
severityLevel: "Warning",
|
|
3082
|
+
title: "Avoid Testing Unsigned Variables for Negativity",
|
|
3083
|
+
enabled: true,
|
|
3084
|
+
parameters: []
|
|
3085
|
+
},
|
|
3086
|
+
{
|
|
3087
|
+
id: "cppcheck_unusedAllocatedMemory",
|
|
3088
|
+
category: "ErrorProne",
|
|
3089
|
+
severityLevel: "High",
|
|
3090
|
+
title: "Avoid Allocating Memory That Is Never Used",
|
|
3091
|
+
enabled: true,
|
|
3092
|
+
parameters: []
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
id: "cppcheck_unusedFunction",
|
|
3096
|
+
category: "UnusedCode",
|
|
3097
|
+
severityLevel: "Warning",
|
|
3098
|
+
title: "Avoid Unused Functions",
|
|
3099
|
+
enabled: false,
|
|
3100
|
+
parameters: []
|
|
3101
|
+
},
|
|
3102
|
+
{
|
|
3103
|
+
id: "cppcheck_unusedLabel",
|
|
3104
|
+
category: "UnusedCode",
|
|
3105
|
+
severityLevel: "Info",
|
|
3106
|
+
title: "Avoid Unused Labels",
|
|
3107
|
+
enabled: true,
|
|
3108
|
+
parameters: []
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
id: "cppcheck_unusedLabelConfiguration",
|
|
3112
|
+
category: "CodeStyle",
|
|
3113
|
+
severityLevel: "Info",
|
|
3114
|
+
title: "Avoid Unused Labels Potentially Removed by Preprocessor",
|
|
3115
|
+
enabled: false,
|
|
3116
|
+
parameters: []
|
|
3117
|
+
},
|
|
3118
|
+
{
|
|
3119
|
+
id: "cppcheck_unusedLabelSwitch",
|
|
3120
|
+
category: "ErrorProne",
|
|
3121
|
+
severityLevel: "High",
|
|
3122
|
+
title: "Avoid Unused Labels in Switch Statements",
|
|
3123
|
+
enabled: false,
|
|
3124
|
+
parameters: []
|
|
3125
|
+
},
|
|
3126
|
+
{
|
|
3127
|
+
id: "cppcheck_unusedLabelSwitchConfiguration",
|
|
3128
|
+
category: "CodeStyle",
|
|
3129
|
+
severityLevel: "Info",
|
|
3130
|
+
title: "Avoid Unused Labels in Switch Statements",
|
|
3131
|
+
enabled: false,
|
|
3132
|
+
parameters: []
|
|
3133
|
+
},
|
|
3134
|
+
{
|
|
3135
|
+
id: "cppcheck_unusedPrivateFunction",
|
|
3136
|
+
category: "UnusedCode",
|
|
3137
|
+
severityLevel: "Warning",
|
|
3138
|
+
title: "Avoid Unused Private Functions",
|
|
3139
|
+
enabled: false,
|
|
3140
|
+
parameters: []
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
id: "cppcheck_unusedScopedObject",
|
|
3144
|
+
category: "Performance",
|
|
3145
|
+
severityLevel: "Warning",
|
|
3146
|
+
title: "Avoid Unused Scoped Object Destruction",
|
|
3147
|
+
enabled: true,
|
|
3148
|
+
parameters: []
|
|
3149
|
+
},
|
|
3150
|
+
{
|
|
3151
|
+
id: "cppcheck_unusedStructMember",
|
|
3152
|
+
category: "UnusedCode",
|
|
3153
|
+
severityLevel: "Warning",
|
|
3154
|
+
title: "Avoid Unused Struct Members",
|
|
3155
|
+
enabled: true,
|
|
3156
|
+
parameters: []
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
id: "cppcheck_unusedVariable",
|
|
3160
|
+
category: "UnusedCode",
|
|
3161
|
+
severityLevel: "Warning",
|
|
3162
|
+
title: "Avoid Unused Variables",
|
|
3163
|
+
enabled: false,
|
|
3164
|
+
parameters: []
|
|
3165
|
+
},
|
|
3166
|
+
{
|
|
3167
|
+
id: "cppcheck_useClosedFile",
|
|
3168
|
+
category: "ErrorProne",
|
|
3169
|
+
severityLevel: "Error",
|
|
3170
|
+
title: "Avoid Using Files That Are Not Opened",
|
|
3171
|
+
enabled: true,
|
|
3172
|
+
parameters: []
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
id: "cppcheck_useInitializationList",
|
|
3176
|
+
category: "Performance",
|
|
3177
|
+
severityLevel: "Warning",
|
|
3178
|
+
title: "Use Initialization List for Constructor Member Initialization",
|
|
3179
|
+
enabled: true,
|
|
3180
|
+
parameters: []
|
|
3181
|
+
},
|
|
3182
|
+
{
|
|
3183
|
+
id: "cppcheck_uselessAssignmentArg",
|
|
3184
|
+
category: "ErrorProne",
|
|
3185
|
+
severityLevel: "Warning",
|
|
3186
|
+
title: "Avoid Assigning to Function Parameters",
|
|
3187
|
+
enabled: true,
|
|
3188
|
+
parameters: []
|
|
3189
|
+
},
|
|
3190
|
+
{
|
|
3191
|
+
id: "cppcheck_uselessAssignmentPtrArg",
|
|
3192
|
+
category: "ErrorProne",
|
|
3193
|
+
severityLevel: "High",
|
|
3194
|
+
title: "Avoid Useless Assignment to Function Pointer Parameter",
|
|
3195
|
+
enabled: true,
|
|
3196
|
+
parameters: []
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
id: "cppcheck_uselessCallsCompare",
|
|
3200
|
+
category: "Performance",
|
|
3201
|
+
severityLevel: "Warning",
|
|
3202
|
+
title: "Avoid Inefficient Self-Comparison Calls",
|
|
3203
|
+
enabled: true,
|
|
3204
|
+
parameters: []
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
id: "cppcheck_uselessCallsEmpty",
|
|
3208
|
+
category: "ErrorProne",
|
|
3209
|
+
severityLevel: "High",
|
|
3210
|
+
title: "Avoid Ineffective Call of 'empty()' Instead of 'clear()'",
|
|
3211
|
+
enabled: true,
|
|
3212
|
+
parameters: []
|
|
3213
|
+
},
|
|
3214
|
+
{
|
|
3215
|
+
id: "cppcheck_uselessCallsRemove",
|
|
3216
|
+
category: "ErrorProne",
|
|
3217
|
+
severityLevel: "High",
|
|
3218
|
+
title: "Handle Return Value of std::remove() to Actually Remove Elements",
|
|
3219
|
+
enabled: true,
|
|
3220
|
+
parameters: []
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
id: "cppcheck_uselessCallsSubstr",
|
|
3224
|
+
category: "Performance",
|
|
3225
|
+
severityLevel: "Warning",
|
|
3226
|
+
title: "Avoid Ineffective Calls to 'substr' That Return Copies",
|
|
3227
|
+
enabled: true,
|
|
3228
|
+
parameters: []
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
id: "cppcheck_uselessCallsSwap",
|
|
3232
|
+
category: "Performance",
|
|
3233
|
+
severityLevel: "Warning",
|
|
3234
|
+
title: "Avoid swapping an object with itself",
|
|
3235
|
+
enabled: true,
|
|
3236
|
+
parameters: []
|
|
3237
|
+
},
|
|
3238
|
+
{
|
|
3239
|
+
id: "cppcheck_uselessOverride",
|
|
3240
|
+
category: "CodeStyle",
|
|
3241
|
+
severityLevel: "Info",
|
|
3242
|
+
title: "Avoid Useless Override Functions",
|
|
3243
|
+
enabled: false,
|
|
3244
|
+
parameters: []
|
|
3245
|
+
},
|
|
3246
|
+
{
|
|
3247
|
+
id: "cppcheck_useStandardLibrary",
|
|
3248
|
+
category: "BestPractice",
|
|
3249
|
+
severityLevel: "Warning",
|
|
3250
|
+
title: "Consider Using memcpy Instead of Loop",
|
|
3251
|
+
enabled: false,
|
|
3252
|
+
parameters: []
|
|
3253
|
+
},
|
|
3254
|
+
{
|
|
3255
|
+
id: "cppcheck_useStlAlgorithm",
|
|
3256
|
+
category: "BestPractice",
|
|
3257
|
+
severityLevel: "Warning",
|
|
3258
|
+
title: "Consider Using STL Algorithm Instead of Raw Loop",
|
|
3259
|
+
enabled: false,
|
|
3260
|
+
parameters: []
|
|
3261
|
+
},
|
|
3262
|
+
{
|
|
3263
|
+
id: "cppcheck_va_end_missing",
|
|
3264
|
+
category: "ErrorProne",
|
|
3265
|
+
severityLevel: "High",
|
|
3266
|
+
title: "Enforce va_list Closure with va_end",
|
|
3267
|
+
enabled: true,
|
|
3268
|
+
parameters: []
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
id: "cppcheck_va_list_usedBeforeStarted",
|
|
3272
|
+
category: "ErrorProne",
|
|
3273
|
+
severityLevel: "High",
|
|
3274
|
+
title: "Avoid Using va_list Before Calling va_start",
|
|
3275
|
+
enabled: true,
|
|
3276
|
+
parameters: []
|
|
3277
|
+
},
|
|
3278
|
+
{
|
|
3279
|
+
id: "cppcheck_varFuncNullUB",
|
|
3280
|
+
category: "ErrorProne",
|
|
3281
|
+
severityLevel: "Error",
|
|
3282
|
+
title: "Avoid Passing NULL After Last Typed Argument to Variadic Functions",
|
|
3283
|
+
enabled: true,
|
|
3284
|
+
parameters: []
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
id: "cppcheck_variableScope",
|
|
3288
|
+
category: "BestPractice",
|
|
3289
|
+
severityLevel: "Warning",
|
|
3290
|
+
title: "Reduce Variable Scope",
|
|
3291
|
+
enabled: true,
|
|
3292
|
+
parameters: []
|
|
3293
|
+
},
|
|
3294
|
+
{
|
|
3295
|
+
id: "cppcheck_va_start_referencePassed",
|
|
3296
|
+
category: "ErrorProne",
|
|
3297
|
+
severityLevel: "Error",
|
|
3298
|
+
title: "Avoid Using Reference as Parameter for va_start()",
|
|
3299
|
+
enabled: true,
|
|
3300
|
+
parameters: []
|
|
3301
|
+
},
|
|
3302
|
+
{
|
|
3303
|
+
id: "cppcheck_va_start_subsequentCalls",
|
|
3304
|
+
category: "ErrorProne",
|
|
3305
|
+
severityLevel: "High",
|
|
3306
|
+
title: "Avoid Subsequent va_start() or va_copy() Calls Without va_end() on 'vl'",
|
|
3307
|
+
enabled: true,
|
|
3308
|
+
parameters: []
|
|
3309
|
+
},
|
|
3310
|
+
{
|
|
3311
|
+
id: "cppcheck_va_start_wrongParameter",
|
|
3312
|
+
category: "ErrorProne",
|
|
3313
|
+
severityLevel: "Error",
|
|
3314
|
+
title: "Ensure Correct Parameter is Passed to va_start()",
|
|
3315
|
+
enabled: true,
|
|
3316
|
+
parameters: []
|
|
3317
|
+
},
|
|
3318
|
+
{
|
|
3319
|
+
id: "cppcheck_virtualCallInConstructor",
|
|
3320
|
+
category: "ErrorProne",
|
|
3321
|
+
severityLevel: "High",
|
|
3322
|
+
title: "Avoid Calling Virtual Functions from Constructors",
|
|
3323
|
+
enabled: false,
|
|
3324
|
+
parameters: []
|
|
3325
|
+
},
|
|
3326
|
+
{
|
|
3327
|
+
id: "cppcheck_virtualDestructor",
|
|
3328
|
+
category: "ErrorProne",
|
|
3329
|
+
severityLevel: "High",
|
|
3330
|
+
title: "Enforce Virtual Destructor in Base Classes with Virtual Functions",
|
|
3331
|
+
enabled: true,
|
|
3332
|
+
parameters: []
|
|
3333
|
+
},
|
|
3334
|
+
{
|
|
3335
|
+
id: "cppcheck_writeReadOnlyFile",
|
|
3336
|
+
category: "ErrorProne",
|
|
3337
|
+
severityLevel: "High",
|
|
3338
|
+
title: "Avoid Write Operation on File Opened for Reading Only",
|
|
3339
|
+
enabled: true,
|
|
3340
|
+
parameters: []
|
|
3341
|
+
},
|
|
3342
|
+
{
|
|
3343
|
+
id: "cppcheck_wrongmathcall",
|
|
3344
|
+
category: "ErrorProne",
|
|
3345
|
+
severityLevel: "High",
|
|
3346
|
+
title: "Avoid Passing Incorrect Values to Math Functions",
|
|
3347
|
+
enabled: true,
|
|
3348
|
+
parameters: []
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
id: "cppcheck_wrongPrintfScanfArgNum",
|
|
3352
|
+
category: "ErrorProne",
|
|
3353
|
+
severityLevel: "High",
|
|
3354
|
+
title: "Enforce Correct Parameter Positioning in printf/scanf Format Strings",
|
|
3355
|
+
enabled: true,
|
|
3356
|
+
parameters: []
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
id: "cppcheck_wrongPrintfScanfParameterPositionError",
|
|
3360
|
+
category: "ErrorProne",
|
|
3361
|
+
severityLevel: "Error",
|
|
3362
|
+
title: "Avoid Incorrect Parameter Position in printf/scanf",
|
|
3363
|
+
enabled: true,
|
|
3364
|
+
parameters: []
|
|
3365
|
+
},
|
|
3366
|
+
{
|
|
3367
|
+
id: "cppcheck_y2038-type-bits-not-64",
|
|
3368
|
+
category: "Security",
|
|
3369
|
+
severityLevel: "Error",
|
|
3370
|
+
title: "_TIME_BITS must be defined equal to 64",
|
|
3371
|
+
enabled: false,
|
|
3372
|
+
parameters: []
|
|
3373
|
+
},
|
|
3374
|
+
{
|
|
3375
|
+
id: "cppcheck_y2038-type-bits-undef",
|
|
3376
|
+
category: "Security",
|
|
3377
|
+
severityLevel: "Warning",
|
|
3378
|
+
title: "_USE_TIME_BITS64 is defined but _TIME_BITS was not",
|
|
3379
|
+
enabled: false,
|
|
3380
|
+
parameters: []
|
|
3381
|
+
},
|
|
3382
|
+
{
|
|
3383
|
+
id: "cppcheck_y2038-unsafe-call",
|
|
3384
|
+
category: "Security",
|
|
3385
|
+
severityLevel: "Warning",
|
|
3386
|
+
title: "Using Y2038-unsafe call",
|
|
3387
|
+
enabled: false,
|
|
3388
|
+
parameters: []
|
|
3389
|
+
},
|
|
3390
|
+
{
|
|
3391
|
+
id: "cppcheck_zerodiv",
|
|
3392
|
+
category: "ErrorProne",
|
|
3393
|
+
severityLevel: "Error",
|
|
3394
|
+
title: "Avoid Division by Zero",
|
|
3395
|
+
enabled: true,
|
|
3396
|
+
parameters: []
|
|
3397
|
+
},
|
|
3398
|
+
{
|
|
3399
|
+
id: "cppcheck_zerodivcond",
|
|
3400
|
+
category: "ErrorProne",
|
|
3401
|
+
severityLevel: "Error",
|
|
3402
|
+
title: "Avoid Division by Zero or Redundant Condition",
|
|
3403
|
+
enabled: true,
|
|
3404
|
+
parameters: []
|
|
3405
|
+
}
|
|
3406
|
+
];
|
|
3407
|
+
|
|
3408
|
+
// src/adapter.ts
|
|
3409
|
+
var TOOL_ID = "cppcheck";
|
|
3410
|
+
var PATTERN_META = new Map(
|
|
3411
|
+
patterns_default.map((p) => [
|
|
3412
|
+
p.id,
|
|
3413
|
+
{
|
|
3414
|
+
category: p.category,
|
|
3415
|
+
severity: p.severityLevel ?? "Info"
|
|
3416
|
+
}
|
|
3417
|
+
])
|
|
3418
|
+
);
|
|
3419
|
+
function ruleMetadata(errorId) {
|
|
3420
|
+
const patternId = `${TOOL_ID}_${errorId}`;
|
|
3421
|
+
return PATTERN_META.get(patternId) ?? { category: "ErrorProne", severity: "Info" };
|
|
3422
|
+
}
|
|
3423
|
+
var BLACKLISTED_ERROR_IDS = /* @__PURE__ */ new Set([
|
|
3424
|
+
"unusedFunction",
|
|
3425
|
+
"missingIncludeSystem",
|
|
3426
|
+
"checkersReport"
|
|
3427
|
+
]);
|
|
3428
|
+
var BINARY = "cppcheck";
|
|
3429
|
+
var xmlParser = new import_fast_xml_parser.XMLParser({
|
|
3430
|
+
ignoreAttributes: false,
|
|
3431
|
+
attributeNamePrefix: "@_",
|
|
3432
|
+
isArray: (name) => name === "error" || name === "location"
|
|
3433
|
+
});
|
|
3434
|
+
function getLineContent(lines, lineNumber) {
|
|
3435
|
+
return lines[lineNumber - 1] ?? "";
|
|
3436
|
+
}
|
|
3437
|
+
async function readFileLines(filePath) {
|
|
3438
|
+
try {
|
|
3439
|
+
const content = await import_promises.default.readFile(filePath, "utf-8");
|
|
3440
|
+
return content.split("\n");
|
|
3441
|
+
} catch {
|
|
3442
|
+
return [];
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
function buildResult(startedAt, completedAt, issues, errors, filesAnalyzed) {
|
|
3446
|
+
const durationMs = completedAt.getTime() - startedAt.getTime();
|
|
3447
|
+
return {
|
|
3448
|
+
metadata: {
|
|
3449
|
+
startedAt: startedAt.toISOString(),
|
|
3450
|
+
completedAt: completedAt.toISOString(),
|
|
3451
|
+
durationMs
|
|
3452
|
+
},
|
|
3453
|
+
issues,
|
|
3454
|
+
errors,
|
|
3455
|
+
summary: {
|
|
3456
|
+
toolId: TOOL_ID,
|
|
3457
|
+
status: errors.some((e) => e.level === "error") ? "partial" : "success",
|
|
3458
|
+
issueCount: issues.length,
|
|
3459
|
+
errorCount: errors.length,
|
|
3460
|
+
durationMs,
|
|
3461
|
+
filesAnalyzed
|
|
3462
|
+
}
|
|
3463
|
+
};
|
|
3464
|
+
}
|
|
3465
|
+
async function getVersionFromBinary(binaryPath) {
|
|
3466
|
+
try {
|
|
3467
|
+
const { stdout, exitCode } = await (0, import_tooling.spawnTool)(binaryPath, ["--version"], {
|
|
3468
|
+
cwd: process.cwd()
|
|
3469
|
+
});
|
|
3470
|
+
if (exitCode !== 0) return null;
|
|
3471
|
+
const match = stdout.match(/Cppcheck\s+(\S+)/);
|
|
3472
|
+
return match ? match[1] : null;
|
|
3473
|
+
} catch {
|
|
3474
|
+
return null;
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
async function resolveBinaryPath(ctx) {
|
|
3478
|
+
const codacyBin = import_path.default.join(ctx.toolInstallDir, BINARY);
|
|
3479
|
+
const version = await getVersionFromBinary(codacyBin);
|
|
3480
|
+
if (version) return codacyBin;
|
|
3481
|
+
return BINARY;
|
|
3482
|
+
}
|
|
3483
|
+
var adapter = {
|
|
3484
|
+
id: TOOL_ID,
|
|
3485
|
+
displayName: "Cppcheck",
|
|
3486
|
+
preferredVersion: "2.18.0",
|
|
3487
|
+
compatibleVersions: ">=2.0.0",
|
|
3488
|
+
website: "https://cppcheck.sourceforge.io",
|
|
3489
|
+
languages: ["C", "C++"],
|
|
3490
|
+
filePatterns: ["**/*.c", "**/*.cpp", "**/*.cc", "**/*.cxx", "**/*.h", "**/*.hpp", "**/*.hh"],
|
|
3491
|
+
supportedOS: ["linux", "darwin", "win32"],
|
|
3492
|
+
supportedArch: ["x64", "arm64"],
|
|
3493
|
+
supportedRunners: ["local", "container"],
|
|
3494
|
+
prerequisites: [],
|
|
3495
|
+
/**
|
|
3496
|
+
* Checks whether the `cppcheck` binary is present and runnable.
|
|
3497
|
+
*
|
|
3498
|
+
* Checks in order:
|
|
3499
|
+
* 1. Codacy-managed path (`ctx.toolInstallDir/cppcheck`) -> installation: "codacy"
|
|
3500
|
+
* 2. Global PATH (`cppcheck`) -> installation: "global"
|
|
3501
|
+
*
|
|
3502
|
+
* Parses the version from `Cppcheck X.Y.Z`. Returns `available: false`
|
|
3503
|
+
* (rather than throwing) if the binary is not found or returns a non-zero exit code.
|
|
3504
|
+
*/
|
|
3505
|
+
async checkAvailability(ctx) {
|
|
3506
|
+
ctx.logger.debug("Checking availability", { toolId: TOOL_ID });
|
|
3507
|
+
const codacyBin = import_path.default.join(ctx.toolInstallDir, BINARY);
|
|
3508
|
+
const codacyVersion = await getVersionFromBinary(codacyBin);
|
|
3509
|
+
if (codacyVersion) {
|
|
3510
|
+
ctx.logger.debug("Found codacy-managed binary", { toolId: TOOL_ID, version: codacyVersion, path: codacyBin });
|
|
3511
|
+
return { available: true, version: codacyVersion, path: codacyBin, installation: "codacy" };
|
|
3512
|
+
}
|
|
3513
|
+
const globalVersion = await getVersionFromBinary(BINARY);
|
|
3514
|
+
if (globalVersion) {
|
|
3515
|
+
ctx.logger.debug("Found global binary", { toolId: TOOL_ID, version: globalVersion });
|
|
3516
|
+
return { available: true, version: globalVersion, installation: "global" };
|
|
3517
|
+
}
|
|
3518
|
+
ctx.logger.debug("Binary not found", { toolId: TOOL_ID, reason: "not in PATH or Codacy install directory" });
|
|
3519
|
+
return {
|
|
3520
|
+
available: false,
|
|
3521
|
+
reason: "cppcheck binary not found in PATH or Codacy install directory",
|
|
3522
|
+
installHint: "brew install cppcheck # macOS\napt install cppcheck # Debian/Ubuntu"
|
|
3523
|
+
};
|
|
3524
|
+
},
|
|
3525
|
+
/**
|
|
3526
|
+
* Cppcheck must be installed via the system package manager.
|
|
3527
|
+
* Automated download/install is not supported for this tool.
|
|
3528
|
+
*/
|
|
3529
|
+
async install(ctx) {
|
|
3530
|
+
ctx.logger.info("Starting install", { toolId: TOOL_ID });
|
|
3531
|
+
ctx.logger.info("Install not supported \u2014 cppcheck must be installed via system package manager", { toolId: TOOL_ID });
|
|
3532
|
+
return {
|
|
3533
|
+
success: false,
|
|
3534
|
+
error: {
|
|
3535
|
+
toolId: TOOL_ID,
|
|
3536
|
+
phase: "toolInstall",
|
|
3537
|
+
kind: "NotSupported",
|
|
3538
|
+
message: "cppcheck must be installed via your system package manager (e.g. brew install cppcheck, apt install cppcheck)",
|
|
3539
|
+
level: "error"
|
|
3540
|
+
}
|
|
3541
|
+
};
|
|
3542
|
+
},
|
|
3543
|
+
/**
|
|
3544
|
+
* Checks for `suppressions.txt` in the repository root.
|
|
3545
|
+
*
|
|
3546
|
+
* Cppcheck can use a suppressions file to silence specific warnings.
|
|
3547
|
+
* This method only reports whether the file exists — the adapter passes
|
|
3548
|
+
* `--suppressions-list` when `useLocalConfigurationFile` is set.
|
|
3549
|
+
*/
|
|
3550
|
+
async checkLocalConfigurationFile(ctx) {
|
|
3551
|
+
ctx.logger.debug("Checking for local config", { toolId: TOOL_ID });
|
|
3552
|
+
const suppressionsPath = import_path.default.join(ctx.repositoryRoot, "suppressions.txt");
|
|
3553
|
+
try {
|
|
3554
|
+
await import_promises.default.access(suppressionsPath);
|
|
3555
|
+
ctx.logger.debug("Local config found", { toolId: TOOL_ID, path: suppressionsPath });
|
|
3556
|
+
return { found: true, path: suppressionsPath };
|
|
3557
|
+
} catch {
|
|
3558
|
+
return { found: false };
|
|
3559
|
+
}
|
|
3560
|
+
},
|
|
3561
|
+
/**
|
|
3562
|
+
* Runs `cppcheck --xml --enable=all` against the target files and converts
|
|
3563
|
+
* the XML output (emitted on stderr) into Codacy Issue objects.
|
|
3564
|
+
*
|
|
3565
|
+
* Config resolution:
|
|
3566
|
+
* - If `useLocalConfigurationFile` is true and `localConfigurationFile` is
|
|
3567
|
+
* set, passes `--suppressions-list=<path>` so cppcheck uses that config.
|
|
3568
|
+
* - Otherwise, cppcheck uses its built-in defaults.
|
|
3569
|
+
*
|
|
3570
|
+
* Key details:
|
|
3571
|
+
* - XML output goes to **stderr**, not stdout.
|
|
3572
|
+
* - `--error-exitcode=0` ensures exit 0 even when findings are present.
|
|
3573
|
+
* - `--suppress=unusedFunction` blacklists this noisy per-file pattern.
|
|
3574
|
+
* - `--inline-suppr` respects developer inline suppressions.
|
|
3575
|
+
* - `--force` checks all configurations even when #ifdef branches are present.
|
|
3576
|
+
* - Inconclusive findings are included (matching existing wrapper behavior).
|
|
3577
|
+
*
|
|
3578
|
+
* Exit codes:
|
|
3579
|
+
* - 0: success (with --error-exitcode=0, always 0 for findings)
|
|
3580
|
+
* - Non-zero: internal error
|
|
3581
|
+
*
|
|
3582
|
+
* Never throws — all errors are captured in the returned `errors` array.
|
|
3583
|
+
*/
|
|
3584
|
+
async analyze(ctx, codacyConfig) {
|
|
3585
|
+
const startMs = Date.now();
|
|
3586
|
+
ctx.logger.info("Starting analysis", { toolId: TOOL_ID, fileCount: ctx.targetFiles.length });
|
|
3587
|
+
const startedAt = /* @__PURE__ */ new Date();
|
|
3588
|
+
const issues = [];
|
|
3589
|
+
const errors = [];
|
|
3590
|
+
if (ctx.targetFiles.length === 0) {
|
|
3591
|
+
return buildResult(startedAt, /* @__PURE__ */ new Date(), issues, errors, 0);
|
|
3592
|
+
}
|
|
3593
|
+
const binary = await resolveBinaryPath(ctx);
|
|
3594
|
+
const absoluteFiles = ctx.targetFiles.map((f) => import_path.default.resolve(ctx.repositoryRoot, f));
|
|
3595
|
+
const args = [
|
|
3596
|
+
"--xml",
|
|
3597
|
+
"--enable=all",
|
|
3598
|
+
"--error-exitcode=0",
|
|
3599
|
+
"--inline-suppr",
|
|
3600
|
+
"--force",
|
|
3601
|
+
"--suppress=unusedFunction"
|
|
3602
|
+
];
|
|
3603
|
+
if (codacyConfig.useLocalConfigurationFile && codacyConfig.localConfigurationFile) {
|
|
3604
|
+
args.push(`--suppressions-list=${codacyConfig.localConfigurationFile}`);
|
|
3605
|
+
}
|
|
3606
|
+
args.push(...absoluteFiles);
|
|
3607
|
+
try {
|
|
3608
|
+
const { stderr, exitCode } = await (0, import_tooling.spawnTool)(binary, args, {
|
|
3609
|
+
cwd: ctx.repositoryRoot,
|
|
3610
|
+
logger: ctx.logger
|
|
3611
|
+
});
|
|
3612
|
+
if (exitCode !== 0) {
|
|
3613
|
+
errors.push({
|
|
3614
|
+
toolId: TOOL_ID,
|
|
3615
|
+
phase: "toolInvoke",
|
|
3616
|
+
kind: "NonZeroExit",
|
|
3617
|
+
message: `cppcheck exited with code ${exitCode}${stderr ? `: ${stderr.trim()}` : ""}`,
|
|
3618
|
+
level: "error"
|
|
3619
|
+
});
|
|
3620
|
+
return buildResult(startedAt, /* @__PURE__ */ new Date(), issues, errors, ctx.targetFiles.length);
|
|
3621
|
+
}
|
|
3622
|
+
if (!stderr.trim()) {
|
|
3623
|
+
return buildResult(startedAt, /* @__PURE__ */ new Date(), issues, errors, ctx.targetFiles.length);
|
|
3624
|
+
}
|
|
3625
|
+
let cppcheckErrors;
|
|
3626
|
+
try {
|
|
3627
|
+
const parsed = xmlParser.parse(stderr);
|
|
3628
|
+
cppcheckErrors = parsed?.results?.errors?.error ?? [];
|
|
3629
|
+
} catch (err) {
|
|
3630
|
+
errors.push({
|
|
3631
|
+
toolId: TOOL_ID,
|
|
3632
|
+
phase: "outputParse",
|
|
3633
|
+
kind: "MalformedOutput",
|
|
3634
|
+
message: `Failed to parse cppcheck XML output: ${err instanceof Error ? err.message : String(err)}`,
|
|
3635
|
+
level: "error"
|
|
3636
|
+
});
|
|
3637
|
+
return buildResult(startedAt, /* @__PURE__ */ new Date(), issues, errors, ctx.targetFiles.length);
|
|
3638
|
+
}
|
|
3639
|
+
const enabledPatterns = new Set(codacyConfig.patterns.map((p) => p.patternId));
|
|
3640
|
+
const errorsByFile = /* @__PURE__ */ new Map();
|
|
3641
|
+
for (const error of cppcheckErrors) {
|
|
3642
|
+
const errorId = error["@_id"];
|
|
3643
|
+
if (BLACKLISTED_ERROR_IDS.has(errorId)) continue;
|
|
3644
|
+
const locations = error.location;
|
|
3645
|
+
if (!locations || locations.length === 0) continue;
|
|
3646
|
+
const primaryLocation = locations[0];
|
|
3647
|
+
const filePath = primaryLocation["@_file"];
|
|
3648
|
+
if (!filePath) continue;
|
|
3649
|
+
const list = errorsByFile.get(filePath) ?? [];
|
|
3650
|
+
list.push({ error, location: primaryLocation });
|
|
3651
|
+
errorsByFile.set(filePath, list);
|
|
3652
|
+
}
|
|
3653
|
+
for (const [absoluteFilePath, fileErrors] of errorsByFile) {
|
|
3654
|
+
const lines = await readFileLines(absoluteFilePath);
|
|
3655
|
+
const relPath = import_path.default.relative(ctx.repositoryRoot, absoluteFilePath);
|
|
3656
|
+
for (const { error, location } of fileErrors) {
|
|
3657
|
+
const errorId = error["@_id"];
|
|
3658
|
+
const patternId = `${TOOL_ID}_${errorId}`;
|
|
3659
|
+
if (enabledPatterns.size > 0 && !enabledPatterns.has(patternId)) {
|
|
3660
|
+
continue;
|
|
3661
|
+
}
|
|
3662
|
+
const line = parseInt(location["@_line"], 10) || 1;
|
|
3663
|
+
const column = parseInt(location["@_column"] ?? "1", 10) || 1;
|
|
3664
|
+
const meta = ruleMetadata(errorId);
|
|
3665
|
+
issues.push({
|
|
3666
|
+
filePath: relPath,
|
|
3667
|
+
patternId,
|
|
3668
|
+
toolId: TOOL_ID,
|
|
3669
|
+
line,
|
|
3670
|
+
column,
|
|
3671
|
+
message: error["@_msg"],
|
|
3672
|
+
lineContent: getLineContent(lines, line),
|
|
3673
|
+
category: meta.category,
|
|
3674
|
+
severity: meta.severity
|
|
3675
|
+
});
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
} catch (err) {
|
|
3679
|
+
errors.push({
|
|
3680
|
+
toolId: TOOL_ID,
|
|
3681
|
+
phase: "toolInvoke",
|
|
3682
|
+
kind: "InvocationError",
|
|
3683
|
+
message: `Failed to run cppcheck: ${err instanceof Error ? err.message : String(err)}`,
|
|
3684
|
+
level: "error"
|
|
3685
|
+
});
|
|
3686
|
+
}
|
|
3687
|
+
const durationMs = Date.now() - startMs;
|
|
3688
|
+
ctx.logger.info("Analysis complete", { toolId: TOOL_ID, issueCount: issues.length, errorCount: errors.length, durationMs });
|
|
3689
|
+
return buildResult(startedAt, /* @__PURE__ */ new Date(), issues, errors, ctx.targetFiles.length);
|
|
3690
|
+
}
|
|
3691
|
+
};
|
|
3692
|
+
|
|
3693
|
+
// src/index.ts
|
|
3694
|
+
var index_default = (0, import_tooling2.defineToolAdapter)(adapter);
|