diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 01388c53c93..868a9621976 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1609,6 +1609,7 @@ void CheckOther::checkConstPointer() { if (!mSettings->severity.isEnabled(Severity::style) && !mSettings->isPremiumEnabled("constParameter") && + !mSettings->isPremiumEnabled("constParameterPointer") && !mSettings->isPremiumEnabled("constParameterReference") && !mSettings->isPremiumEnabled("constPointer")) return; diff --git a/lib/settings.cpp b/lib/settings.cpp index 63d7d08f9bd..5041cfde1cc 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -316,7 +316,36 @@ void Settings::setCheckLevel(CheckLevel level) } } -// TODO: auto generate these tables +// These tables are auto generated from Cppcheck Premium script + +static const std::set cweCheckers{ + "StlMissingComparison", + "assignBoolToPointer", + "autovarInvalidDeallocation", + "deallocuse", + "derefInvalidIterator", + "doubleFree", + "funcArgOrderDifferent", + "globalLockGuard", + "ignoredReturnValue", + "invalidTestForOverflow", + "invalidscanf", + "leakNoVarFunctionCall", + "leakReturnValNotUsed", + "localMutex", + "multiCondition", + "raceAfterInterlockedDecrement", + "resourceLeak", + "rethrowNoCurrentException", + "signConversion", + "signedCharArrayIndex", + "stlIfStrFind", + "unhandledExceptionSpecification", + "unknownEvaluationOrder", + "useClosedFile", + "varFuncNullUB", + "virtualDestructor" +}; static const std::set autosarCheckers{ "accessMoved",