Cppcheck
checkers.cpp
Go to the documentation of this file.
1 /*
2  * Cppcheck - A tool for static C/C++ code analysis
3  * Copyright (C) 2007-2024 Cppcheck team.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 // This file is auto-generated by tools/get_checkers.py:
20 // python3 tools/get_checkers.py > lib/checkers.cpp
21 
22 #include "checkers.h"
23 
24 namespace checkers {
25  const std::map<std::string, std::string> allCheckers{
26  {"CheckBool::checkIncrementBoolean","style"},
27  {"CheckBool::checkBitwiseOnBoolean","style,inconclusive"},
28  {"CheckBool::checkComparisonOfBoolWithInt","warning,c++"},
29  {"CheckBool::checkComparisonOfFuncReturningBool","style,c++"},
30  {"CheckBool::checkComparisonOfBoolWithBool","style,c++"},
31  {"CheckBool::checkAssignBoolToPointer",""},
32  {"CheckBool::checkComparisonOfBoolExpressionWithInt","warning"},
33  {"CheckBool::pointerArithBool",""},
34  {"CheckBool::checkAssignBoolToFloat","style,c++"},
35  {"CheckBool::returnValueOfFunctionReturningBool","style"},
36  {"CheckPostfixOperator::postfixOperator","performance"},
37  {"CheckSizeof::checkSizeofForNumericParameter","warning"},
38  {"CheckSizeof::checkSizeofForArrayParameter","warning"},
39  {"CheckSizeof::checkSizeofForPointerSize","warning"},
40  {"CheckSizeof::sizeofsizeof","warning"},
41  {"CheckSizeof::sizeofCalculation","warning"},
42  {"CheckSizeof::sizeofFunction","warning"},
43  {"CheckSizeof::suspiciousSizeofCalculation","warning,inconclusive"},
44  {"CheckSizeof::sizeofVoid","portability"},
45  {"Check64BitPortability::pointerassignment","portability"},
46  {"CheckStl::outOfBounds",""},
47  {"CheckStl::outOfBoundsIndexExpression",""},
48  {"CheckStl::iterators",""},
49  {"CheckStl::misMatchingContainers",""},
50  {"CheckStl::misMatchingContainerIterator",""},
51  {"CheckStl::invalidContainer",""},
52  {"CheckStl::stlOutOfBounds",""},
53  {"CheckStl::negativeIndex",""},
54  {"CheckStl::erase",""},
55  {"CheckStl::stlBoundaries",""},
56  {"CheckStl::if_find","warning,performance"},
57  {"CheckStl::checkFindInsert","performance"},
58  {"CheckStl::size","performance,c++03"},
59  {"CheckStl::redundantCondition","style"},
60  {"CheckStl::missingComparison","warning"},
61  {"CheckStl::string_c_str",""},
62  {"CheckStl::uselessCalls","performance,warning"},
63  {"CheckStl::checkDereferenceInvalidIterator","warning"},
64  {"CheckStl::checkDereferenceInvalidIterator2",""},
65  {"CheckStl::useStlAlgorithm","style"},
66  {"CheckStl::knownEmptyContainer","style"},
67  {"CheckStl::eraseIteratorOutOfBounds",""},
68  {"CheckStl::checkMutexes","warning"},
69  {"CheckBoost::checkBoostForeachModification",""},
70  {"CheckNullPointer::nullPointer",""},
71  {"CheckNullPointer::nullConstantDereference",""},
72  {"CheckNullPointer::arithmetic",""},
73  {"CheckNullPointer::analyseWholeProgram","unusedfunctions"},
74  {"CheckBufferOverrun::arrayIndex",""},
75  {"CheckBufferOverrun::pointerArithmetic","portability"},
76  {"CheckBufferOverrun::bufferOverflow",""},
77  {"CheckBufferOverrun::arrayIndexThenCheck",""},
78  {"CheckBufferOverrun::stringNotZeroTerminated","warning,inconclusive"},
79  {"CheckBufferOverrun::argumentSize","warning"},
80  {"CheckBufferOverrun::analyseWholeProgram",""},
81  {"CheckBufferOverrun::objectIndex",""},
82  {"CheckBufferOverrun::negativeArraySize",""},
83  {"CheckUninitVar::check",""},
84  {"CheckUninitVar::valueFlowUninit",""},
85  {"CheckOther::checkCastIntToCharAndBack","warning"},
86  {"CheckOther::clarifyCalculation","style"},
87  {"CheckOther::clarifyStatement","warning"},
88  {"CheckOther::checkSuspiciousSemicolon","warning,inconclusive"},
89  {"CheckOther::warningOldStylePointerCast","style,c++"},
90  {"CheckOther::invalidPointerCast","portability"},
91  {"CheckOther::checkRedundantAssignment","style"},
92  {"CheckOther::redundantBitwiseOperationInSwitch","warning"},
93  {"CheckOther::checkSuspiciousCaseInSwitch","warning,inconclusive"},
94  {"CheckOther::checkUnreachableCode","style"},
95  {"CheckOther::checkVariableScope","style,notclang"},
96  {"CheckOther::checkPassByReference","performance,c++"},
97  {"CheckOther::checkConstVariable","style,c++"},
98  {"CheckOther::checkConstPointer","style"},
99  {"CheckOther::checkCharVariable","warning,portability"},
100  {"CheckOther::checkIncompleteStatement","warning"},
101  {"CheckOther::checkZeroDivision",""},
102  {"CheckOther::checkNanInArithmeticExpression","style"},
103  {"CheckOther::checkMisusedScopedObject","style,c++"},
104  {"CheckOther::checkDuplicateBranch","style,inconclusive"},
105  {"CheckOther::checkInvalidFree",""},
106  {"CheckOther::checkDuplicateExpression","style,warning"},
107  {"CheckOther::checkComparisonFunctionIsAlwaysTrueOrFalse","warning"},
108  {"CheckOther::checkSignOfUnsignedVariable","style"},
109  {"CheckOther::checkRedundantCopy","c++,performance,inconclusive"},
110  {"CheckOther::checkNegativeBitwiseShift",""},
111  {"CheckOther::checkIncompleteArrayFill","warning,portability,inconclusive"},
112  {"CheckOther::checkVarFuncNullUB","portability"},
113  {"CheckOther::checkRedundantPointerOp","style"},
114  {"CheckOther::checkInterlockedDecrement","windows-platform"},
115  {"CheckOther::checkUnusedLabel","style,warning"},
116  {"CheckOther::checkEvaluationOrder","C/C++03"},
117  {"CheckOther::checkAccessOfMovedVariable","c++11,warning"},
118  {"CheckOther::checkFuncArgNamesDifferent","style,warning,inconclusive"},
119  {"CheckOther::checkShadowVariables","style"},
120  {"CheckOther::checkKnownArgument","style"},
121  {"CheckOther::checkKnownPointerToBool","style"},
122  {"CheckOther::checkComparePointers",""},
123  {"CheckOther::checkModuloOfOne","style"},
124  {"CheckOther::checkOverlappingWrite",""},
125  {"CheckClass::checkConstructors","style,warning"},
126  {"CheckClass::checkExplicitConstructors","style"},
127  {"CheckClass::checkCopyConstructors","warning"},
128  {"CheckClass::initializationListUsage","performance"},
129  {"CheckClass::privateFunctions","style"},
130  {"CheckClass::checkMemset",""},
131  {"CheckClass::operatorEqRetRefThis","style"},
132  {"CheckClass::operatorEqToSelf","warning"},
133  {"CheckClass::virtualDestructor",""},
134  {"CheckClass::thisSubtraction","warning"},
135  {"CheckClass::checkConst","style,inconclusive"},
136  {"CheckClass::initializerListOrder","style,inconclusive"},
137  {"CheckClass::checkSelfInitialization",""},
138  {"CheckClass::checkVirtualFunctionCallInConstructor","warning"},
139  {"CheckClass::checkDuplInheritedMembers","warning"},
140  {"CheckClass::checkMissingOverride","style,c++03"},
141  {"CheckClass::checkUselessOverride","style"},
142  {"CheckClass::checkReturnByReference","performance"},
143  {"CheckClass::checkThisUseAfterFree","warning"},
144  {"CheckClass::checkUnsafeClassRefMember","warning,safeChecks"},
145  {"CheckClass::analyseWholeProgram",""},
146  {"CheckUnusedVar::checkFunctionVariableUsage","style"},
147  {"CheckUnusedVar::checkStructMemberUsage","style"},
148  {"CheckIO::checkCoutCerrMisusage","c"},
149  {"CheckIO::checkFileUsage",""},
150  {"CheckIO::invalidScanf",""},
151  {"CheckIO::checkWrongPrintfScanfArguments",""},
152  {"CheckCondition::assignIf","style"},
153  {"CheckCondition::checkBadBitmaskCheck","style"},
154  {"CheckCondition::comparison","style"},
155  {"CheckCondition::duplicateCondition","style"},
156  {"CheckCondition::multiCondition","style"},
157  {"CheckCondition::multiCondition2","warning"},
158  {"CheckCondition::checkIncorrectLogicOperator","style,warning"},
159  {"CheckCondition::checkModuloAlwaysTrueFalse","warning"},
160  {"CheckCondition::clarifyCondition","style"},
161  {"CheckCondition::alwaysTrueFalse","style"},
162  {"CheckCondition::checkInvalidTestForOverflow","warning"},
163  {"CheckCondition::checkPointerAdditionResultNotNull","warning"},
164  {"CheckCondition::checkDuplicateConditionalAssign","style"},
165  {"CheckCondition::checkAssignmentInCondition","style"},
166  {"CheckCondition::checkCompareValueOutOfTypeRange","style,platform"},
167  {"CheckFunctions::checkProhibitedFunctions",""},
168  {"CheckFunctions::invalidFunctionUsage",""},
169  {"CheckFunctions::checkIgnoredReturnValue","style,warning"},
170  {"CheckFunctions::checkMissingReturn",""},
171  {"CheckFunctions::checkMathFunctions","style,warning,c99,c++11"},
172  {"CheckFunctions::memsetZeroBytes","warning"},
173  {"CheckFunctions::memsetInvalid2ndParam","warning,portability"},
174  {"CheckFunctions::returnLocalStdMove","performance,c++11"},
175  {"CheckFunctions::useStandardLibrary","style"},
176  {"CheckVaarg::va_start_argument",""},
177  {"CheckVaarg::va_list_usage","notclang"},
178  {"CheckUnusedFunctions::check","unusedFunction"},
179  {"CheckType::checkTooBigBitwiseShift","platform"},
180  {"CheckType::checkIntegerOverflow","platform"},
181  {"CheckType::checkSignConversion","warning"},
182  {"CheckType::checkLongCast","style"},
183  {"CheckType::checkFloatToIntegerOverflow",""},
184  {"CheckString::stringLiteralWrite",""},
185  {"CheckString::checkAlwaysTrueOrFalseStringCompare","warning"},
186  {"CheckString::checkSuspiciousStringCompare","warning"},
187  {"CheckString::strPlusChar",""},
188  {"CheckString::checkIncorrectStringCompare","warning"},
189  {"CheckString::overlappingStrcmp","warning"},
190  {"CheckString::sprintfOverlappingData",""},
191  {"CheckAssert::assertWithSideEffects","warning"},
192  {"CheckExceptionSafety::destructors","warning"},
193  {"CheckExceptionSafety::deallocThrow","warning"},
194  {"CheckExceptionSafety::checkRethrowCopy","style"},
195  {"CheckExceptionSafety::checkCatchExceptionByValue","style"},
196  {"CheckExceptionSafety::nothrowThrows",""},
197  {"CheckExceptionSafety::unhandledExceptionSpecification","style,inconclusive"},
198  {"CheckExceptionSafety::rethrowNoCurrentException",""},
199  {"CheckAutoVariables::assignFunctionArg","style,warning"},
200  {"CheckAutoVariables::autoVariables",""},
201  {"CheckAutoVariables::checkVarLifetime",""},
202  {"CheckLeakAutoVar::check","notclang"},
203  {"CheckMemoryLeakInFunction::checkReallocUsage",""},
204  {"CheckMemoryLeakInClass::check",""},
205  {"CheckMemoryLeakStructMember::check",""},
206  {"CheckMemoryLeakNoVar::check",""},
207  {"CheckMemoryLeakNoVar::checkForUnsafeArgAlloc",""},
208  };
209 
210  const std::map<std::string, std::string> premiumCheckers{
211  {"Autosar: A0-1-3",""},
212  {"Autosar: A0-1-6",""},
213  {"Autosar: A0-4-2",""},
214  {"Autosar: A0-4-4",""},
215  {"Autosar: A10-1-1",""},
216  {"Autosar: A11-0-2",""},
217  {"Autosar: A11-3-1",""},
218  {"Autosar: A13-2-1",""},
219  {"Autosar: A13-2-3",""},
220  {"Autosar: A13-5-2",""},
221  {"Autosar: A13-5-5",""},
222  {"Autosar: A15-1-2",""},
223  {"Autosar: A15-3-5",""},
224  {"Autosar: A16-6-1",""},
225  {"Autosar: A16-7-1",""},
226  {"Autosar: A18-0-3",""},
227  {"Autosar: A18-1-1",""},
228  {"Autosar: A18-1-2",""},
229  {"Autosar: A18-1-3",""},
230  {"Autosar: A18-5-1",""},
231  {"Autosar: A18-9-1",""},
232  {"Autosar: A2-11-1",""},
233  {"Autosar: A2-13-1",""},
234  {"Autosar: A2-13-3",""},
235  {"Autosar: A2-13-5",""},
236  {"Autosar: A2-5-2",""},
237  {"Autosar: A20-8-2","warning"},
238  {"Autosar: A20-8-3","warning"},
239  {"Autosar: A20-8-4",""},
240  {"Autosar: A20-8-5",""},
241  {"Autosar: A20-8-6",""},
242  {"Autosar: A21-8-1","warning"},
243  {"Autosar: A23-0-1",""},
244  {"Autosar: A25-1-1","warning"},
245  {"Autosar: A25-4-1","warning"},
246  {"Autosar: A26-5-1",""},
247  {"Autosar: A26-5-2",""},
248  {"Autosar: A27-0-1","warning"},
249  {"Autosar: A27-0-2",""},
250  {"Autosar: A27-0-4",""},
251  {"Autosar: A3-1-3",""},
252  {"Autosar: A3-1-4",""},
253  {"Autosar: A3-3-1",""},
254  {"Autosar: A4-10-1",""},
255  {"Autosar: A4-7-1",""},
256  {"Autosar: A5-0-2",""},
257  {"Autosar: A5-0-3",""},
258  {"Autosar: A5-0-4",""},
259  {"Autosar: A5-1-1",""},
260  {"Autosar: A5-1-2",""},
261  {"Autosar: A5-1-3",""},
262  {"Autosar: A5-1-6",""},
263  {"Autosar: A5-1-7",""},
264  {"Autosar: A5-16-1",""},
265  {"Autosar: A5-2-1",""},
266  {"Autosar: A5-2-4",""},
267  {"Autosar: A6-5-3",""},
268  {"Autosar: A7-1-4",""},
269  {"Autosar: A7-1-6",""},
270  {"Autosar: A7-1-7",""},
271  {"Autosar: A8-4-1",""},
272  {"Autosar: A8-5-3",""},
273  {"Autosar: A9-3-1",""},
274  {"Cert C++: CON51-CPP",""},
275  {"Cert C++: CON52-CPP",""},
276  {"Cert C++: CON53-CPP",""},
277  {"Cert C++: CON54-CPP",""},
278  {"Cert C++: CON55-CPP",""},
279  {"Cert C++: CON56-CPP",""},
280  {"Cert C++: CTR50-CPP",""},
281  {"Cert C++: CTR52-CPP",""},
282  {"Cert C++: CTR53-CPP",""},
283  {"Cert C++: CTR56-CPP",""},
284  {"Cert C++: CTR57-CPP","warning"},
285  {"Cert C++: CTR58-CPP","warning"},
286  {"Cert C++: DCL50-CPP",""},
287  {"Cert C++: DCL51-CPP",""},
288  {"Cert C++: DCL52-CPP",""},
289  {"Cert C++: DCL53-CPP",""},
290  {"Cert C++: DCL54-CPP",""},
291  {"Cert C++: DCL56-CPP",""},
292  {"Cert C++: DCL58-CPP",""},
293  {"Cert C++: DCL59-CPP",""},
294  {"Cert C++: ERR50-CPP",""},
295  {"Cert C++: ERR51-CPP",""},
296  {"Cert C++: ERR52-CPP",""},
297  {"Cert C++: ERR53-CPP",""},
298  {"Cert C++: ERR54-CPP",""},
299  {"Cert C++: ERR55-CPP",""},
300  {"Cert C++: ERR56-CPP",""},
301  {"Cert C++: ERR58-CPP",""},
302  {"Cert C++: ERR59-CPP","warning"},
303  {"Cert C++: ERR60-CPP","warning"},
304  {"Cert C++: ERR61-CPP",""},
305  {"Cert C++: ERR62-CPP",""},
306  {"Cert C++: EXP50-CPP",""},
307  {"Cert C++: EXP51-CPP",""},
308  {"Cert C++: EXP55-CPP",""},
309  {"Cert C++: EXP56-CPP",""},
310  {"Cert C++: EXP57-CPP",""},
311  {"Cert C++: EXP58-CPP",""},
312  {"Cert C++: EXP59-CPP",""},
313  {"Cert C++: FIO51-CPP",""},
314  {"Cert C++: INT50-CPP",""},
315  {"Cert C++: MEM52-CPP",""},
316  {"Cert C++: MEM53-CPP",""},
317  {"Cert C++: MEM54-CPP",""},
318  {"Cert C++: MEM55-CPP",""},
319  {"Cert C++: MEM57-CPP",""},
320  {"Cert C++: MSC50-CPP",""},
321  {"Cert C++: MSC51-CPP",""},
322  {"Cert C++: MSC53-CPP",""},
323  {"Cert C++: MSC54-CPP",""},
324  {"Cert C++: OOP51-CPP",""},
325  {"Cert C++: OOP55-CPP",""},
326  {"Cert C++: OOP56-CPP",""},
327  {"Cert C++: OOP57-CPP",""},
328  {"Cert C++: OOP58-CPP",""},
329  {"Cert C++: STR50-CPP",""},
330  {"Cert C++: STR53-CPP",""},
331  {"Cert C: ARR30-C",""},
332  {"Cert C: ARR32-C",""},
333  {"Cert C: ARR37-C",""},
334  {"Cert C: ARR38-C",""},
335  {"Cert C: ARR39-C",""},
336  {"Cert C: CON30-C",""},
337  {"Cert C: CON31-C",""},
338  {"Cert C: CON32-C",""},
339  {"Cert C: CON33-C",""},
340  {"Cert C: CON34-C",""},
341  {"Cert C: CON35-C",""},
342  {"Cert C: CON36-C",""},
343  {"Cert C: CON37-C",""},
344  {"Cert C: CON38-C",""},
345  {"Cert C: CON39-C",""},
346  {"Cert C: CON40-C",""},
347  {"Cert C: CON41-C",""},
348  {"Cert C: DCL31-C",""},
349  {"Cert C: DCL36-C",""},
350  {"Cert C: DCL37-C",""},
351  {"Cert C: DCL38-C",""},
352  {"Cert C: DCL39-C",""},
353  {"Cert C: DCL40-C",""},
354  {"Cert C: DCL41-C",""},
355  {"Cert C: ENV30-C",""},
356  {"Cert C: ENV31-C",""},
357  {"Cert C: ENV32-C",""},
358  {"Cert C: ENV33-C",""},
359  {"Cert C: ENV34-C",""},
360  {"Cert C: ERR30-C",""},
361  {"Cert C: ERR32-C",""},
362  {"Cert C: ERR33-C",""},
363  {"Cert C: EXP32-C",""},
364  {"Cert C: EXP35-C",""},
365  {"Cert C: EXP36-C",""},
366  {"Cert C: EXP37-C",""},
367  {"Cert C: EXP39-C",""},
368  {"Cert C: EXP40-C",""},
369  {"Cert C: EXP42-C",""},
370  {"Cert C: EXP43-C",""},
371  {"Cert C: EXP45-C",""},
372  {"Cert C: FIO30-C",""},
373  {"Cert C: FIO32-C",""},
374  {"Cert C: FIO34-C",""},
375  {"Cert C: FIO37-C",""},
376  {"Cert C: FIO38-C",""},
377  {"Cert C: FIO40-C",""},
378  {"Cert C: FIO41-C",""},
379  {"Cert C: FIO44-C",""},
380  {"Cert C: FIO45-C",""},
381  {"Cert C: FLP30-C",""},
382  {"Cert C: FLP36-C","portability"},
383  {"Cert C: FLP37-C",""},
384  {"Cert C: INT30-C",""},
385  {"Cert C: INT31-C",""},
386  {"Cert C: INT32-C",""},
387  {"Cert C: INT33-C",""},
388  {"Cert C: INT34-C",""},
389  {"Cert C: INT35-C",""},
390  {"Cert C: INT36-C",""},
391  {"Cert C: MEM33-C",""},
392  {"Cert C: MEM35-C",""},
393  {"Cert C: MEM36-C",""},
394  {"Cert C: MSC30-C",""},
395  {"Cert C: MSC32-C",""},
396  {"Cert C: MSC33-C",""},
397  {"Cert C: MSC38-C",""},
398  {"Cert C: MSC39-C",""},
399  {"Cert C: MSC40-C",""},
400  {"Cert C: PRE31-C",""},
401  {"Cert C: SIG30-C",""},
402  {"Cert C: SIG31-C",""},
403  {"Cert C: SIG34-C",""},
404  {"Cert C: SIG35-C",""},
405  {"Cert C: STR31-C",""},
406  {"Cert C: STR32-C",""},
407  {"Cert C: STR34-C",""},
408  {"Cert C: STR38-C",""},
409  {"Misra C++ 2008: 3-2-3",""},
410  {"Misra C++ 2008: 3-2-4",""},
411  {"Misra C++ 2008: 7-5-4",""},
412  {"Misra C++ 2008: M0-1-11",""},
413  {"Misra C++ 2008: M0-1-12",""},
414  {"Misra C++ 2008: M0-1-4",""},
415  {"Misra C++ 2008: M0-1-5",""},
416  {"Misra C++ 2008: M0-1-7",""},
417  {"Misra C++ 2008: M0-1-8",""},
418  {"Misra C++ 2008: M0-3-2",""},
419  {"Misra C++ 2008: M1-0-1","portability"},
420  {"Misra C++ 2008: M10-1-1",""},
421  {"Misra C++ 2008: M10-1-2",""},
422  {"Misra C++ 2008: M10-1-3",""},
423  {"Misra C++ 2008: M10-2-1",""},
424  {"Misra C++ 2008: M10-3-1",""},
425  {"Misra C++ 2008: M10-3-2",""},
426  {"Misra C++ 2008: M10-3-3",""},
427  {"Misra C++ 2008: M11-0-1",""},
428  {"Misra C++ 2008: M12-1-2",""},
429  {"Misra C++ 2008: M12-8-1",""},
430  {"Misra C++ 2008: M12-8-2",""},
431  {"Misra C++ 2008: M14-5-1","warning"},
432  {"Misra C++ 2008: M14-5-2","warning"},
433  {"Misra C++ 2008: M14-5-3","warning"},
434  {"Misra C++ 2008: M14-6-1","warning"},
435  {"Misra C++ 2008: M14-6-2","warning"},
436  {"Misra C++ 2008: M14-7-1",""},
437  {"Misra C++ 2008: M14-7-2",""},
438  {"Misra C++ 2008: M14-7-3",""},
439  {"Misra C++ 2008: M14-8-1",""},
440  {"Misra C++ 2008: M14-8-2",""},
441  {"Misra C++ 2008: M15-0-3",""},
442  {"Misra C++ 2008: M15-1-1",""},
443  {"Misra C++ 2008: M15-1-2",""},
444  {"Misra C++ 2008: M15-1-3",""},
445  {"Misra C++ 2008: M15-3-2","warning"},
446  {"Misra C++ 2008: M15-3-3",""},
447  {"Misra C++ 2008: M15-3-4",""},
448  {"Misra C++ 2008: M15-3-6",""},
449  {"Misra C++ 2008: M15-3-7",""},
450  {"Misra C++ 2008: M15-4-1",""},
451  {"Misra C++ 2008: M15-5-2",""},
452  {"Misra C++ 2008: M16-0-1",""},
453  {"Misra C++ 2008: M16-0-2",""},
454  {"Misra C++ 2008: M16-0-3",""},
455  {"Misra C++ 2008: M16-0-4",""},
456  {"Misra C++ 2008: M16-0-6",""},
457  {"Misra C++ 2008: M16-0-7",""},
458  {"Misra C++ 2008: M16-0-8",""},
459  {"Misra C++ 2008: M16-1-1",""},
460  {"Misra C++ 2008: M16-1-2",""},
461  {"Misra C++ 2008: M16-2-1",""},
462  {"Misra C++ 2008: M16-2-2",""},
463  {"Misra C++ 2008: M16-2-3",""},
464  {"Misra C++ 2008: M16-2-4",""},
465  {"Misra C++ 2008: M16-2-5",""},
466  {"Misra C++ 2008: M16-2-6",""},
467  {"Misra C++ 2008: M16-3-1",""},
468  {"Misra C++ 2008: M16-3-2",""},
469  {"Misra C++ 2008: M17-0-1",""},
470  {"Misra C++ 2008: M17-0-2",""},
471  {"Misra C++ 2008: M17-0-3",""},
472  {"Misra C++ 2008: M17-0-5",""},
473  {"Misra C++ 2008: M18-0-1",""},
474  {"Misra C++ 2008: M18-0-2",""},
475  {"Misra C++ 2008: M18-0-3",""},
476  {"Misra C++ 2008: M18-0-4",""},
477  {"Misra C++ 2008: M18-0-5",""},
478  {"Misra C++ 2008: M18-2-1",""},
479  {"Misra C++ 2008: M18-4-1",""},
480  {"Misra C++ 2008: M18-7-1",""},
481  {"Misra C++ 2008: M19-3-1",""},
482  {"Misra C++ 2008: M2-10-1",""},
483  {"Misra C++ 2008: M2-10-3",""},
484  {"Misra C++ 2008: M2-10-4",""},
485  {"Misra C++ 2008: M2-10-5",""},
486  {"Misra C++ 2008: M2-10-6",""},
487  {"Misra C++ 2008: M2-13-2",""},
488  {"Misra C++ 2008: M2-13-3",""},
489  {"Misra C++ 2008: M2-13-4",""},
490  {"Misra C++ 2008: M2-13-5",""},
491  {"Misra C++ 2008: M2-3-1",""},
492  {"Misra C++ 2008: M2-7-1",""},
493  {"Misra C++ 2008: M2-7-2",""},
494  {"Misra C++ 2008: M2-7-3",""},
495  {"Misra C++ 2008: M27-0-1",""},
496  {"Misra C++ 2008: M3-1-1",""},
497  {"Misra C++ 2008: M3-1-2",""},
498  {"Misra C++ 2008: M3-1-3",""},
499  {"Misra C++ 2008: M3-2-1",""},
500  {"Misra C++ 2008: M3-3-1",""},
501  {"Misra C++ 2008: M3-3-2",""},
502  {"Misra C++ 2008: M3-9-1",""},
503  {"Misra C++ 2008: M3-9-2",""},
504  {"Misra C++ 2008: M3-9-3",""},
505  {"Misra C++ 2008: M4-10-1",""},
506  {"Misra C++ 2008: M4-10-2",""},
507  {"Misra C++ 2008: M4-5-1",""},
508  {"Misra C++ 2008: M4-5-2",""},
509  {"Misra C++ 2008: M4-5-3",""},
510  {"Misra C++ 2008: M5-0-10",""},
511  {"Misra C++ 2008: M5-0-11",""},
512  {"Misra C++ 2008: M5-0-12",""},
513  {"Misra C++ 2008: M5-0-14",""},
514  {"Misra C++ 2008: M5-0-15",""},
515  {"Misra C++ 2008: M5-0-2",""},
516  {"Misra C++ 2008: M5-0-20",""},
517  {"Misra C++ 2008: M5-0-21",""},
518  {"Misra C++ 2008: M5-0-3",""},
519  {"Misra C++ 2008: M5-0-4",""},
520  {"Misra C++ 2008: M5-0-5",""},
521  {"Misra C++ 2008: M5-0-6",""},
522  {"Misra C++ 2008: M5-0-7",""},
523  {"Misra C++ 2008: M5-0-8",""},
524  {"Misra C++ 2008: M5-0-9",""},
525  {"Misra C++ 2008: M5-14-1",""},
526  {"Misra C++ 2008: M5-17-1",""},
527  {"Misra C++ 2008: M5-18-1",""},
528  {"Misra C++ 2008: M5-19-1",""},
529  {"Misra C++ 2008: M5-2-1",""},
530  {"Misra C++ 2008: M5-2-10",""},
531  {"Misra C++ 2008: M5-2-11",""},
532  {"Misra C++ 2008: M5-2-12",""},
533  {"Misra C++ 2008: M5-2-2",""},
534  {"Misra C++ 2008: M5-2-3",""},
535  {"Misra C++ 2008: M5-2-5",""},
536  {"Misra C++ 2008: M5-2-6",""},
537  {"Misra C++ 2008: M5-2-7",""},
538  {"Misra C++ 2008: M5-2-8",""},
539  {"Misra C++ 2008: M5-2-9",""},
540  {"Misra C++ 2008: M5-3-1",""},
541  {"Misra C++ 2008: M5-3-2",""},
542  {"Misra C++ 2008: M5-3-3",""},
543  {"Misra C++ 2008: M6-2-1",""},
544  {"Misra C++ 2008: M6-2-2",""},
545  {"Misra C++ 2008: M6-2-3",""},
546  {"Misra C++ 2008: M6-3-1",""},
547  {"Misra C++ 2008: M6-4-1",""},
548  {"Misra C++ 2008: M6-4-2",""},
549  {"Misra C++ 2008: M6-4-3",""},
550  {"Misra C++ 2008: M6-4-4",""},
551  {"Misra C++ 2008: M6-4-5",""},
552  {"Misra C++ 2008: M6-4-6",""},
553  {"Misra C++ 2008: M6-4-7",""},
554  {"Misra C++ 2008: M6-4-8",""},
555  {"Misra C++ 2008: M6-5-1",""},
556  {"Misra C++ 2008: M6-5-2",""},
557  {"Misra C++ 2008: M6-5-3",""},
558  {"Misra C++ 2008: M6-5-4",""},
559  {"Misra C++ 2008: M6-5-5",""},
560  {"Misra C++ 2008: M6-5-6",""},
561  {"Misra C++ 2008: M6-6-1",""},
562  {"Misra C++ 2008: M6-6-2",""},
563  {"Misra C++ 2008: M6-6-3",""},
564  {"Misra C++ 2008: M6-6-4",""},
565  {"Misra C++ 2008: M6-6-5",""},
566  {"Misra C++ 2008: M7-2-1",""},
567  {"Misra C++ 2008: M7-3-1",""},
568  {"Misra C++ 2008: M7-3-2",""},
569  {"Misra C++ 2008: M7-3-3",""},
570  {"Misra C++ 2008: M7-3-4",""},
571  {"Misra C++ 2008: M7-3-5",""},
572  {"Misra C++ 2008: M7-3-6",""},
573  {"Misra C++ 2008: M7-4-2",""},
574  {"Misra C++ 2008: M7-4-3",""},
575  {"Misra C++ 2008: M7-5-3",""},
576  {"Misra C++ 2008: M8-0-1",""},
577  {"Misra C++ 2008: M8-3-1",""},
578  {"Misra C++ 2008: M8-4-4",""},
579  {"Misra C++ 2008: M8-5-2",""},
580  {"Misra C++ 2008: M8-5-3",""},
581  {"Misra C++ 2008: M9-3-1",""},
582  {"Misra C++ 2008: M9-5-1",""},
583  {"Misra C++ 2008: M9-6-2",""},
584  {"Misra C++ 2008: M9-6-3",""},
585  {"Misra C++ 2008: M9-6-4",""},
586  {"Misra C++ 2023: 0.1.2",""},
587  {"Misra C++ 2023: 0.2.1",""},
588  {"Misra C++ 2023: 0.2.2",""},
589  {"Misra C++ 2023: 0.2.3",""},
590  {"Misra C++ 2023: 0.2.4",""},
591  {"Misra C++ 2023: 10.0.1",""},
592  {"Misra C++ 2023: 10.1.2",""},
593  {"Misra C++ 2023: 10.2.1",""},
594  {"Misra C++ 2023: 10.2.2",""},
595  {"Misra C++ 2023: 10.2.3",""},
596  {"Misra C++ 2023: 10.3.1",""},
597  {"Misra C++ 2023: 10.4.1",""},
598  {"Misra C++ 2023: 11.3.1",""},
599  {"Misra C++ 2023: 11.3.2",""},
600  {"Misra C++ 2023: 11.6.1",""},
601  {"Misra C++ 2023: 11.6.3",""},
602  {"Misra C++ 2023: 12.2.1",""},
603  {"Misra C++ 2023: 12.2.2",""},
604  {"Misra C++ 2023: 12.2.3",""},
605  {"Misra C++ 2023: 12.3.1",""},
606  {"Misra C++ 2023: 13.1.1",""},
607  {"Misra C++ 2023: 13.1.2",""},
608  {"Misra C++ 2023: 13.3.1",""},
609  {"Misra C++ 2023: 13.3.2",""},
610  {"Misra C++ 2023: 13.3.3",""},
611  {"Misra C++ 2023: 13.3.4",""},
612  {"Misra C++ 2023: 14.1.1",""},
613  {"Misra C++ 2023: 15.0.1",""},
614  {"Misra C++ 2023: 15.0.2",""},
615  {"Misra C++ 2023: 15.1.2",""},
616  {"Misra C++ 2023: 15.1.3",""},
617  {"Misra C++ 2023: 15.1.5",""},
618  {"Misra C++ 2023: 16.5.1",""},
619  {"Misra C++ 2023: 16.5.2",""},
620  {"Misra C++ 2023: 16.6.1",""},
621  {"Misra C++ 2023: 17.8.1",""},
622  {"Misra C++ 2023: 18.1.1",""},
623  {"Misra C++ 2023: 18.1.2",""},
624  {"Misra C++ 2023: 18.3.1",""},
625  {"Misra C++ 2023: 18.3.2",""},
626  {"Misra C++ 2023: 18.3.3",""},
627  {"Misra C++ 2023: 18.4.1",""},
628  {"Misra C++ 2023: 18.5.1",""},
629  {"Misra C++ 2023: 18.5.2",""},
630  {"Misra C++ 2023: 19.0.1",""},
631  {"Misra C++ 2023: 19.0.2",""},
632  {"Misra C++ 2023: 19.0.3",""},
633  {"Misra C++ 2023: 19.0.4",""},
634  {"Misra C++ 2023: 19.1.1",""},
635  {"Misra C++ 2023: 19.1.2",""},
636  {"Misra C++ 2023: 19.1.3",""},
637  {"Misra C++ 2023: 19.2.1",""},
638  {"Misra C++ 2023: 19.2.2",""},
639  {"Misra C++ 2023: 19.2.3",""},
640  {"Misra C++ 2023: 19.3.1",""},
641  {"Misra C++ 2023: 19.3.2",""},
642  {"Misra C++ 2023: 19.3.3",""},
643  {"Misra C++ 2023: 19.3.4",""},
644  {"Misra C++ 2023: 19.6.1",""},
645  {"Misra C++ 2023: 21.10.1",""},
646  {"Misra C++ 2023: 21.10.2",""},
647  {"Misra C++ 2023: 21.10.3",""},
648  {"Misra C++ 2023: 21.2.1",""},
649  {"Misra C++ 2023: 21.2.2",""},
650  {"Misra C++ 2023: 21.2.3",""},
651  {"Misra C++ 2023: 21.2.4",""},
652  {"Misra C++ 2023: 21.6.1",""},
653  {"Misra C++ 2023: 21.6.2",""},
654  {"Misra C++ 2023: 21.6.3",""},
655  {"Misra C++ 2023: 21.6.4",""},
656  {"Misra C++ 2023: 21.6.5",""},
657  {"Misra C++ 2023: 22.3.1",""},
658  {"Misra C++ 2023: 22.4.1",""},
659  {"Misra C++ 2023: 23.11.1",""},
660  {"Misra C++ 2023: 24.5.1",""},
661  {"Misra C++ 2023: 24.5.2",""},
662  {"Misra C++ 2023: 25.5.1",""},
663  {"Misra C++ 2023: 25.5.2",""},
664  {"Misra C++ 2023: 25.5.3",""},
665  {"Misra C++ 2023: 26.3.1",""},
666  {"Misra C++ 2023: 28.3.1",""},
667  {"Misra C++ 2023: 28.6.1",""},
668  {"Misra C++ 2023: 28.6.2",""},
669  {"Misra C++ 2023: 30.0.1",""},
670  {"Misra C++ 2023: 30.0.2",""},
671  {"Misra C++ 2023: 4.1.1",""},
672  {"Misra C++ 2023: 4.1.2",""},
673  {"Misra C++ 2023: 5.0.1",""},
674  {"Misra C++ 2023: 5.13.1",""},
675  {"Misra C++ 2023: 5.13.2",""},
676  {"Misra C++ 2023: 5.13.3",""},
677  {"Misra C++ 2023: 5.13.4",""},
678  {"Misra C++ 2023: 5.13.5",""},
679  {"Misra C++ 2023: 5.13.6",""},
680  {"Misra C++ 2023: 5.13.7",""},
681  {"Misra C++ 2023: 5.7.1",""},
682  {"Misra C++ 2023: 5.7.2",""},
683  {"Misra C++ 2023: 5.7.3",""},
684  {"Misra C++ 2023: 6.0.1",""},
685  {"Misra C++ 2023: 6.0.2",""},
686  {"Misra C++ 2023: 6.0.3",""},
687  {"Misra C++ 2023: 6.0.4",""},
688  {"Misra C++ 2023: 6.2.2",""},
689  {"Misra C++ 2023: 6.2.3",""},
690  {"Misra C++ 2023: 6.2.4",""},
691  {"Misra C++ 2023: 6.4.2",""},
692  {"Misra C++ 2023: 6.4.3",""},
693  {"Misra C++ 2023: 6.5.1",""},
694  {"Misra C++ 2023: 6.5.2",""},
695  {"Misra C++ 2023: 6.7.1",""},
696  {"Misra C++ 2023: 6.7.2",""},
697  {"Misra C++ 2023: 6.8.3",""},
698  {"Misra C++ 2023: 6.8.4",""},
699  {"Misra C++ 2023: 6.9.1",""},
700  {"Misra C++ 2023: 6.9.2",""},
701  {"Misra C++ 2023: 7.0.1",""},
702  {"Misra C++ 2023: 7.0.2",""},
703  {"Misra C++ 2023: 7.0.3",""},
704  {"Misra C++ 2023: 7.0.4",""},
705  {"Misra C++ 2023: 7.0.5",""},
706  {"Misra C++ 2023: 7.0.6",""},
707  {"Misra C++ 2023: 7.11.1",""},
708  {"Misra C++ 2023: 7.11.2",""},
709  {"Misra C++ 2023: 7.11.3",""},
710  {"Misra C++ 2023: 8.0.1",""},
711  {"Misra C++ 2023: 8.1.1",""},
712  {"Misra C++ 2023: 8.1.2",""},
713  {"Misra C++ 2023: 8.14.1",""},
714  {"Misra C++ 2023: 8.18.2",""},
715  {"Misra C++ 2023: 8.19.1",""},
716  {"Misra C++ 2023: 8.2.1",""},
717  {"Misra C++ 2023: 8.2.10",""},
718  {"Misra C++ 2023: 8.2.11",""},
719  {"Misra C++ 2023: 8.2.2",""},
720  {"Misra C++ 2023: 8.2.3",""},
721  {"Misra C++ 2023: 8.2.4",""},
722  {"Misra C++ 2023: 8.2.5",""},
723  {"Misra C++ 2023: 8.2.6",""},
724  {"Misra C++ 2023: 8.2.7",""},
725  {"Misra C++ 2023: 8.2.8",""},
726  {"Misra C++ 2023: 8.2.9",""},
727  {"Misra C++ 2023: 8.20.1",""},
728  {"Misra C++ 2023: 8.3.1",""},
729  {"Misra C++ 2023: 8.3.2",""},
730  {"Misra C++ 2023: 9.2.1",""},
731  {"Misra C++ 2023: 9.3.1",""},
732  {"Misra C++ 2023: 9.4.1",""},
733  {"Misra C++ 2023: 9.4.2",""},
734  {"Misra C++ 2023: 9.5.1",""},
735  {"Misra C++ 2023: 9.5.2",""},
736  {"Misra C++ 2023: 9.6.1",""},
737  {"Misra C++ 2023: 9.6.2",""},
738  {"Misra C++ 2023: 9.6.3",""},
739  {"Misra C++ 2023: 9.6.4",""},
740  {"Misra C: 1.4",""},
741  {"Misra C: 1.5",""},
742  {"Misra C: 10.1",""},
743  {"Misra C: 10.2",""},
744  {"Misra C: 10.3",""},
745  {"Misra C: 10.4",""},
746  {"Misra C: 10.5",""},
747  {"Misra C: 10.6",""},
748  {"Misra C: 10.7",""},
749  {"Misra C: 10.8",""},
750  {"Misra C: 11.10",""},
751  {"Misra C: 12.3",""},
752  {"Misra C: 12.6",""},
753  {"Misra C: 13.1",""},
754  {"Misra C: 13.2",""},
755  {"Misra C: 13.3",""},
756  {"Misra C: 13.4",""},
757  {"Misra C: 13.5",""},
758  {"Misra C: 13.6",""},
759  {"Misra C: 15.5",""},
760  {"Misra C: 16.3",""},
761  {"Misra C: 17.10",""},
762  {"Misra C: 17.11",""},
763  {"Misra C: 17.12",""},
764  {"Misra C: 17.13",""},
765  {"Misra C: 17.2",""},
766  {"Misra C: 17.3",""},
767  {"Misra C: 17.4",""},
768  {"Misra C: 17.9",""},
769  {"Misra C: 18.10",""},
770  {"Misra C: 18.5",""},
771  {"Misra C: 18.8",""},
772  {"Misra C: 18.9",""},
773  {"Misra C: 20.3",""},
774  {"Misra C: 21.1",""},
775  {"Misra C: 21.12",""},
776  {"Misra C: 21.16",""},
777  {"Misra C: 21.2",""},
778  {"Misra C: 21.22",""},
779  {"Misra C: 21.23",""},
780  {"Misra C: 21.24",""},
781  {"Misra C: 21.25","warning"},
782  {"Misra C: 21.26","warning"},
783  {"Misra C: 22.11",""},
784  {"Misra C: 22.12",""},
785  {"Misra C: 22.13",""},
786  {"Misra C: 22.14",""},
787  {"Misra C: 22.15",""},
788  {"Misra C: 22.16","warning"},
789  {"Misra C: 22.17","warning"},
790  {"Misra C: 22.18","warning"},
791  {"Misra C: 22.19","warning"},
792  {"Misra C: 22.20",""},
793  {"Misra C: 23.1",""},
794  {"Misra C: 23.2",""},
795  {"Misra C: 23.3",""},
796  {"Misra C: 23.4",""},
797  {"Misra C: 23.5",""},
798  {"Misra C: 23.6",""},
799  {"Misra C: 23.7",""},
800  {"Misra C: 23.8",""},
801  {"Misra C: 6.3",""},
802  {"Misra C: 7.5",""},
803  {"Misra C: 7.6",""},
804  {"Misra C: 8.1",""},
805  {"Misra C: 8.10",""},
806  {"Misra C: 8.15",""},
807  {"Misra C: 8.16",""},
808  {"Misra C: 8.17",""},
809  {"Misra C: 8.3",""},
810  {"Misra C: 8.4",""},
811  {"Misra C: 8.6",""},
812  {"Misra C: 8.7",""},
813  {"Misra C: 8.8",""},
814  {"Misra C: 9.6",""},
815  {"Misra C: 9.7",""},
816  {"PremiumCheckBufferOverrun::addressOfPointerArithmetic","warning"},
817  {"PremiumCheckBufferOverrun::negativeBufferSizeCheckedNonZero","warning"},
818  {"PremiumCheckBufferOverrun::negativeBufferSizeCheckedNonZero","warning"},
819  {"PremiumCheckHang::infiniteLoop",""},
820  {"PremiumCheckHang::infiniteLoopContinue",""},
821  {"PremiumCheckOther::arrayPointerComparison","style"},
822  {"PremiumCheckOther::knownResult","style"},
823  {"PremiumCheckOther::lossOfPrecision","style"},
824  {"PremiumCheckOther::pointerCast","style"},
825  {"PremiumCheckOther::reassignInLoop","style"},
826  {"PremiumCheckOther::unreachableCode","style"},
827  {"PremiumCheckStrictAlias::strictAliasCondition","warning"},
828  {"PremiumCheckUninitVar::uninitmember",""},
829  {"PremiumCheckUninitVar::uninitvar",""},
830  {"PremiumCheckUnusedVar::unreadVariable","style"},
831  {"PremiumCheckUnusedVar::unusedPrivateMember","style"}
832  };
833 
834  const char Req[] = "Required";
835  const char Adv[] = "Advisory";
836  const char Man[] = "Mandatory";
837 
838  const std::vector<MisraInfo> misraC2012Rules =
839  {
840  {1,1,Req,0},
841  {1,2,Adv,0},
842  {1,3,Req,0},
843  {1,4,Req,2}, // amendment 2
844  {1,5,Req,3}, // Amendment 3
845  {2,1,Req,0},
846  {2,2,Req,0},
847  {2,3,Adv,0},
848  {2,4,Adv,0},
849  {2,5,Adv,0},
850  {2,6,Adv,0},
851  {2,7,Adv,0},
852  {2,8,Adv,0},
853  {3,1,Req,0},
854  {3,2,Req,0},
855  {4,1,Req,0},
856  {4,2,Adv,0},
857  {5,1,Req,0},
858  {5,2,Req,0},
859  {5,3,Req,0},
860  {5,4,Req,0},
861  {5,5,Req,0},
862  {5,6,Req,0},
863  {5,7,Req,0},
864  {5,8,Req,0},
865  {5,9,Adv,0},
866  {6,1,Req,0},
867  {6,2,Req,0},
868  {6,3,Req,0},
869  {7,1,Req,0},
870  {7,2,Req,0},
871  {7,3,Req,0},
872  {7,4,Req,0},
873  {7,5,Man,0},
874  {7,6,Req,0},
875  {8,1,Req,0},
876  {8,2,Req,0},
877  {8,3,Req,0},
878  {8,4,Req,0},
879  {8,5,Req,0},
880  {8,6,Req,0},
881  {8,7,Adv,0},
882  {8,8,Req,0},
883  {8,9,Adv,0},
884  {8,10,Req,0},
885  {8,11,Adv,0},
886  {8,12,Req,0},
887  {8,13,Adv,0},
888  {8,14,Req,0},
889  {8,15,Req,0},
890  {8,16,Adv,0},
891  {8,17,Adv,0},
892  {9,1,Man,0},
893  {9,2,Req,0},
894  {9,3,Req,0},
895  {9,4,Req,0},
896  {9,5,Req,0},
897  {9,6,Req,0},
898  {9,7,Man,0},
899  {10,1,Req,0},
900  {10,2,Req,0},
901  {10,3,Req,0},
902  {10,4,Req,0},
903  {10,5,Adv,0},
904  {10,6,Req,0},
905  {10,7,Req,0},
906  {10,8,Req,0},
907  {11,1,Req,0},
908  {11,2,Req,0},
909  {11,3,Req,0},
910  {11,4,Adv,0},
911  {11,5,Adv,0},
912  {11,6,Req,0},
913  {11,7,Req,0},
914  {11,8,Req,0},
915  {11,9,Req,0},
916  {11,10,Req,0},
917  {12,1,Adv,0},
918  {12,2,Req,0},
919  {12,3,Adv,0},
920  {12,4,Adv,0},
921  {12,5,Man,1}, // amendment 1
922  {12,6,Req,4}, // amendment 4
923  {13,1,Req,0},
924  {13,2,Req,0},
925  {13,3,Adv,0},
926  {13,4,Adv,0},
927  {13,5,Req,0},
928  {13,6,Man,0},
929  {14,1,Req,0},
930  {14,2,Req,0},
931  {14,3,Req,0},
932  {14,4,Req,0},
933  {15,1,Adv,0},
934  {15,2,Req,0},
935  {15,3,Req,0},
936  {15,4,Adv,0},
937  {15,5,Adv,0},
938  {15,6,Req,0},
939  {15,7,Req,0},
940  {16,1,Req,0},
941  {16,2,Req,0},
942  {16,3,Req,0},
943  {16,4,Req,0},
944  {16,5,Req,0},
945  {16,6,Req,0},
946  {16,7,Req,0},
947  {17,1,Req,0},
948  {17,2,Req,0},
949  {17,3,Man,0},
950  {17,4,Man,0},
951  {17,5,Adv,0},
952  {17,6,Man,0},
953  {17,7,Req,0},
954  {17,8,Adv,0},
955  {17,9,Man,0},
956  {17,10,Req,0},
957  {17,11,Adv,0},
958  {17,12,Adv,0},
959  {17,13,Req,0},
960  {18,1,Req,0},
961  {18,2,Req,0},
962  {18,3,Req,0},
963  {18,4,Adv,0},
964  {18,5,Adv,0},
965  {18,6,Req,0},
966  {18,7,Req,0},
967  {18,8,Req,0},
968  {18,9,Req,0},
969  {18,10,Man,0},
970  {19,1,Man,0},
971  {19,2,Adv,0},
972  {20,1,Adv,0},
973  {20,2,Req,0},
974  {20,3,Req,0},
975  {20,4,Req,0},
976  {20,5,Adv,0},
977  {20,6,Req,0},
978  {20,7,Req,0},
979  {20,8,Req,0},
980  {20,9,Req,0},
981  {20,10,Adv,0},
982  {20,11,Req,0},
983  {20,12,Req,0},
984  {20,13,Req,0},
985  {20,14,Req,0},
986  {21,1,Req,0},
987  {21,2,Req,0},
988  {21,3,Req,0},
989  {21,4,Req,0},
990  {21,5,Req,0},
991  {21,6,Req,0},
992  {21,7,Req,0},
993  {21,8,Req,0},
994  {21,9,Req,0},
995  {21,10,Req,0},
996  {21,11,Req,0},
997  {21,12,Adv,0},
998  {21,13,Man,1}, // Amendment 1
999  {21,14,Req,1}, // Amendment 1
1000  {21,15,Req,1}, // Amendment 1
1001  {21,16,Req,1}, // Amendment 1
1002  {21,17,Req,1}, // Amendment 1
1003  {21,18,Man,1}, // Amendment 1
1004  {21,19,Man,1}, // Amendment 1
1005  {21,20,Man,1}, // Amendment 1
1006  {21,21,Req,3}, // Amendment 3
1007  {21,22,Man,3}, // Amendment 3
1008  {21,23,Req,3}, // Amendment 3
1009  {21,24,Req,3}, // Amendment 3
1010  {21,25,Req,4}, // Amendment 4
1011  {21,26,Req,4}, // Amendment 4
1012  {22,1,Req,0},
1013  {22,2,Man,0},
1014  {22,3,Req,0},
1015  {22,4,Man,0},
1016  {22,5,Man,0},
1017  {22,6,Man,0},
1018  {22,7,Req,1}, // Amendment 1
1019  {22,8,Req,1}, // Amendment 1
1020  {22,9,Req,1}, // Amendment 1
1021  {22,10,Req,1}, // Amendment 1
1022  {22,11,Req,4}, // Amendment 4
1023  {22,12,Man,4}, // Amendment 4
1024  {22,13,Req,4}, // Amendment 4
1025  {22,14,Man,4}, // Amendment 4
1026  {22,15,Req,4}, // Amendment 4
1027  {22,16,Req,4}, // Amendment 4
1028  {22,17,Req,4}, // Amendment 4
1029  {22,18,Req,4}, // Amendment 4
1030  {22,19,Req,4}, // Amendment 4
1031  {22,20,Man,4}, // Amendment 4
1032  {23,1,Adv,3}, // Amendment 3
1033  {23,2,Req,3}, // Amendment 3
1034  {23,3,Adv,3}, // Amendment 3
1035  {23,4,Req,3}, // Amendment 3
1036  {23,5,Adv,3}, // Amendment 3
1037  {23,6,Req,3}, // Amendment 3
1038  {23,7,Adv,3}, // Amendment 3
1039  {23,8,Req,3}, // Amendment 3
1040  };
1041 
1042  const std::map<std::string, std::string> misraRuleSeverity{
1043  {"1.1", "error"}, //{"syntaxError", "unknownMacro"}},
1044  {"1.3", "error"}, //most "error"
1045  {"2.1", "style"}, //{"alwaysFalse", "duplicateBreak"}},
1046  {"2.2", "style"}, //{"alwaysTrue", "redundantCondition", "redundantAssignment", "redundantAssignInSwitch", "unreadVariable"}},
1047  {"2.6", "style"}, //{"unusedLabel"}},
1048  {"2.8", "style"}, //{"unusedVariable"}},
1049  {"5.3", "style"}, //{"shadowVariable"}},
1050  {"8.3", "style"}, //{"funcArgNamesDifferent"}}, // inconclusive
1051  {"8.13", "style"}, //{"constPointer"}},
1052  {"9.1", "error"}, //{"uninitvar"}},
1053  {"14.3", "style"}, //{"alwaysTrue", "alwaysFalse", "compareValueOutOfTypeRangeError", "knownConditionTrueFalse"}},
1054  {"13.2", "error"}, //{"unknownEvaluationOrder"}},
1055  {"13.6", "style"}, //{"sizeofCalculation"}},
1056  {"17.4", "error"}, //{"missingReturn"}},
1057  {"17.5", "warning"}, //{"argumentSize"}},
1058  {"18.1", "error"}, //{"pointerOutOfBounds"}},
1059  {"18.2", "error"}, //{"comparePointers"}},
1060  {"18.3", "error"}, //{"comparePointers"}},
1061  {"18.6", "error"}, //{"danglingLifetime"}},
1062  {"19.1", "error"}, //{"overlappingWriteUnion", "overlappingWriteFunction"}},
1063  {"20.6", "error"}, //{"preprocessorErrorDirective"}},
1064  {"21.13", "error"}, //{"invalidFunctionArg"}},
1065  {"21.17", "error"}, //{"bufferAccessOutOfBounds"}},
1066  {"21.18", "error"}, //{"bufferAccessOutOfBounds"}},
1067  {"22.1", "error"}, //{"memleak", "resourceLeak", "memleakOnRealloc", "leakReturnValNotUsed", "leakNoVarFunctionCall"}},
1068  {"22.2", "error"}, //{"autovarInvalidDeallocation"}},
1069  {"22.3", "error"}, //{"incompatibleFileOpen"}},
1070  {"22.4", "error"}, //{"writeReadOnlyFile"}},
1071  {"22.6", "error"}, //{"useClosedFile"}}
1072  };
1073 }
const char Req[]
Definition: checkers.cpp:834
const std::vector< MisraInfo > misraC2012Rules
Definition: checkers.cpp:838
const char Adv[]
Definition: checkers.cpp:835
const std::map< std::string, std::string > premiumCheckers
Definition: checkers.cpp:210
const std::map< std::string, std::string > misraRuleSeverity
Definition: checkers.cpp:1042
const std::map< std::string, std::string > allCheckers
Definition: checkers.cpp:25
const char Man[]
Definition: checkers.cpp:836