Skip to content

Commit 52b9648

Browse files
committed
update
1 parent c128495 commit 52b9648

2 files changed

Lines changed: 44 additions & 9 deletions

File tree

lib/checkclass.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,15 +2748,17 @@ namespace { // avoid one-definition-rule violation
27482748

27492749
void CheckClass::initializerListOrder()
27502750
{
2751-
if (!mSettings->severity.isEnabled(Severity::style) && !mSettings->isPremiumEnabled("initializerList"))
2752-
return;
2751+
if (!mSettings->isPremiumEnabled("initializerList")) {
2752+
if (!mSettings->severity.isEnabled(Severity::style))
2753+
return;
27532754

2754-
// This check is not inconclusive. However it only determines if the initialization
2755-
// order is incorrect. It does not determine if being out of order causes
2756-
// a real error. Out of order is not necessarily an error but you can never
2757-
// have an error if the list is in order so this enforces defensive programming.
2758-
if (!mSettings->certainty.isEnabled(Certainty::inconclusive))
2759-
return;
2755+
// This check is not inconclusive. However it only determines if the initialization
2756+
// order is incorrect. It does not determine if being out of order causes
2757+
// a real error. Out of order is not necessarily an error but you can never
2758+
// have an error if the list is in order so this enforces defensive programming.
2759+
if (!mSettings->certainty.isEnabled(Certainty::inconclusive))
2760+
return;
2761+
}
27602762

27612763
logChecker("CheckClass::initializerListOrder"); // style,inconclusive
27622764

lib/settings.cpp

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,33 +458,66 @@ static const std::set<std::string> certCCheckers{
458458
static const std::set<std::string> certCppCheckers{
459459
"IOWithoutPositioning",
460460
"accessMoved",
461+
"argumentSize",
462+
"arrayIndexOutOfBounds",
463+
"arrayIndexOutOfBoundsCond",
464+
"arrayIndexThenCheck",
465+
"autoVariables",
466+
"autovarInvalidDeallocation",
467+
"bitwiseOnBoolean",
468+
"bufferAccessOutOfBounds",
461469
"comparePointers",
462470
"containerOutOfBounds",
463471
"ctuOneDefinitionRuleViolation",
464472
"danglingLifetime",
465473
"danglingReference",
466474
"danglingTempReference",
467475
"danglingTemporaryLifetime",
476+
"deallocret",
468477
"deallocuse",
469478
"doubleFree",
470479
"eraseDereference",
471480
"exceptDeallocThrow",
472481
"exceptThrowInDestructor",
482+
"floatConversionOverflow",
473483
"initializerList",
484+
"integerOverflow",
474485
"invalidContainer",
486+
"invalidFunctionArg",
487+
"invalidLengthModifierError",
488+
"invalidLifetime",
489+
"invalidScanfFormatWidth",
490+
"invalidscanf",
491+
"leakReturnValNotUsed",
492+
"leakUnsafeArgAlloc",
475493
"memleak",
494+
"memleakOnRealloc",
476495
"mismatchAllocDealloc",
477496
"missingReturn",
497+
"negativeIndex",
478498
"nullPointer",
499+
"nullPointerArithmetic",
500+
"nullPointerArithmeticRedundantCheck",
501+
"nullPointerDefaultArg",
502+
"nullPointerRedundantCheck",
503+
"objectIndex",
479504
"operatorEqToSelf",
505+
"pointerOutOfBounds",
506+
"pointerOutOfBoundsCond",
507+
"preprocessorErrorDirective",
508+
"resourceLeak",
480509
"returnDanglingLifetime",
481510
"sizeofCalculation",
511+
"stringLiteralWrite",
482512
"uninitStructMember",
483513
"uninitdata",
484514
"uninitvar",
485515
"useAfterFree",
516+
"useClosedFile",
486517
"virtualCallInConstructor",
487-
"virtualDestructor"
518+
"virtualDestructor",
519+
"wrongPrintfScanfArgNum",
520+
"wrongPrintfScanfParameterPositionError"
488521
};
489522

490523
static const std::set<std::string> misrac2012Checkers{

0 commit comments

Comments
 (0)