Cppcheck
|
This is just a container for general settings so that we don't need to pass individual values to functions or constructors now or in the future when we might have even more detailed settings. More...
#include <settings.h>
Classes | |
struct | SafeChecks |
Do not only check how interface is used. More... | |
Public Types | |
enum class | ExecutorType |
enum class | CheckLevel { normal , exhaustive } |
using | ExecuteCmdFn = std::function< int(std::string, std::vector< std::string >, std::string, std::string &)> |
Public Member Functions | |
Settings () | |
bool | isPremiumEnabled (const char id[]) const |
Is checker id enabled by premiumArgs. More... | |
bool | configurationExcluded (const std::string &file) const |
return true if a included file is to be excluded in Preprocessor::getConfigs More... | |
std::string | addEnabled (const std::string &str) |
Enable extra checks by id. More... | |
std::string | removeEnabled (const std::string &str) |
Disable extra checks by id. More... | |
bool | isEnabled (const ValueFlow::Value *value, bool inconclusiveCheck=false) const |
Returns true if given value can be shown. More... | |
bool | hasLib (const std::string &lib) const |
Is library specified? More... | |
void | loadSummaries () |
bool | useSingleJob () const |
void | setCheckLevel (CheckLevel level) |
void | setMisraRuleTexts (const ExecuteCmdFn &executeCommand) |
void | setMisraRuleTexts (const std::string &data) |
std::string | getMisraRuleText (const std::string &id, const std::string &text) const |
Static Public Member Functions | |
static std::string | loadCppcheckCfg (Settings &settings, Suppressions &suppressions) |
static std::pair< std::string, std::string > | getNameAndVersion (const std::string &productName) |
static void | terminate (bool t=true) |
Request termination of checking. More... | |
static bool | terminated () |
termination requested? More... | |
static ExecutorType | defaultExecutor () |
Public Attributes | |
std::unordered_set< std::string > | addons |
addons, either filename of python/json file or json data More... | |
std::vector< AddonInfo > | addonInfos |
the loaded addons infos More... | |
std::string | addonPython |
Path to the python interpreter to be used to run addons. More... | |
std::vector< std::string > | basePaths |
Paths used as base for conversion to relative paths. More... | |
std::string | buildDir |
–cppcheck-build-dir. More... | |
bool | checkAllConfigurations = true |
check all configurations (false if -D or –max-configs is used More... | |
bool | checkConfiguration {} |
Is the 'configuration checking' wanted? More... | |
bool | checkHeaders = true |
Check code in the headers, this is on by default but can be turned off to save CPU. More... | |
bool | checkLibrary {} |
Check for incomplete info in library files? More... | |
int | checksMaxTime {} |
The maximum time in seconds for the checks of a single file. More... | |
std::string | checkersReportFilename |
–checkers-report=<filename> : Generate report of executed checkers More... | |
std::set< std::string > | checkUnknownFunctionReturn |
check unknown function return values More... | |
bool | checkUnusedTemplates = true |
Check unused/uninstantiated templates. More... | |
bool | clang {} |
Use Clang. More... | |
std::string | clangExecutable = "clang" |
Custom Clang executable. More... | |
bool | clangTidy {} |
Use clang-tidy. More... | |
bool | clearIncludeCache {} |
Internal: Clear the simplecpp non-existing include cache. More... | |
std::set< std::string > | configExcludePaths |
include paths excluded from checking the configuration More... | |
std::string | cppcheckCfgProductName |
cppcheck.cfg: Custom product name More... | |
std::string | cppcheckCfgAbout |
cppcheck.cfg: About text More... | |
bool | daca {} |
Are we running from DACA script? More... | |
bool | debugnormal {} |
Is –debug-normal given? More... | |
bool | debugSimplified {} |
Is –debug-simplified given? More... | |
bool | debugtemplate {} |
Is –debug-template given? More... | |
bool | debugwarnings {} |
Is –debug-warnings given? More... | |
bool | dump {} |
Is –dump given? More... | |
std::string | dumpFile |
Standards::Language | enforcedLang {} |
Name of the language that is enforced. More... | |
ExecutorType | executor |
std::string | exename |
int | exitCode {} |
If errors are found, this value is returned from main(). More... | |
std::vector< std::string > | fileFilters |
List of –file-filter for analyzing special files. More... | |
bool | force {} |
Force checking the files with "too many" configurations (–force). More... | |
std::list< std::string > | includePaths |
List of include paths, e.g. More... | |
bool | inlineSuppressions {} |
Is –inline-suppr given? More... | |
unsigned int | jobs = 1 |
How many processes/threads should do checking at the same time. More... | |
std::list< std::string > | libraries |
–library= More... | |
Library | library |
Library. More... | |
int | loadAverage {} |
Load average value. More... | |
int | maxConfigs = 12 |
Maximum number of configurations to check before bailing. More... | |
int | maxCtuDepth = 2 |
–max-ctu-depth More... | |
int | maxTemplateRecursion = 100 |
max template recursion More... | |
std::string | outputFile |
write results (–output-file=<file>) More... | |
Platform | platform |
int | performanceValueFlowMaxTime = -1 |
Experimental: –performance-valueflow-max-time=T. More... | |
int | performanceValueFlowMaxIfCount = -1 |
–performance-valueflow-max-if-count=C More... | |
int | performanceValueFlowMaxSubFunctionArgs = 256 |
max number of sets of arguments to pass to subfuncions in valueflow More... | |
int | pid |
pid of cppcheck. More... | |
std::string | plistOutput |
plist output (–plist-output=<dir>) More... | |
std::string | premiumArgs |
Extra arguments for Cppcheck Premium addon. More... | |
bool | preprocessOnly {} |
Using -E for debugging purposes. More... | |
bool | quiet {} |
Is –quiet given? More... | |
bool | relativePaths {} |
Use relative paths in output. More... | |
int | reportProgress {-1} |
–report-progress More... | |
bool | safety = false |
Safety certified behavior Show checkers report when Cppcheck finishes Make cppcheck checking more strict about critical errors. More... | |
SafeChecks | safeChecks |
SimpleEnableGroup< Severity > | severity |
SimpleEnableGroup< Certainty > | certainty |
SimpleEnableGroup< Checks > | checks |
SHOWTIME_MODES | showtime {} |
show timing information (–showtime=file|summary|top5) More... | |
Standards | standards |
Struct contains standards settings. More... | |
Suppressions | supprs |
suppressions More... | |
std::string | templateFormat |
The output format in which the errors are printed in text mode, e.g. More... | |
std::string | templateLocation |
The output format in which the error locations are printed in text mode, e.g. More... | |
std::size_t | templateMaxTime {} |
The maximum time in seconds for the template instantiation. More... | |
std::size_t | typedefMaxTime {} |
The maximum time in seconds for the typedef simplification. More... | |
std::string | userDefines |
defines given by the user More... | |
std::set< std::string > | userUndefs |
undefines given by the user More... | |
std::list< std::string > | userIncludes |
forced includes given by the user More... | |
std::size_t | valueFlowMaxIterations = 4 |
the maximum iterations of valueflow (–valueflow-max-iterations=T) More... | |
bool | verbose {} |
Is –verbose given? More... | |
bool | xml {} |
write XML results (–xml) More... | |
int | xml_version = 2 |
XML version (–xml-version=..) More... | |
std::set< std::string > | summaryReturn |
CheckLevel | checkLevel = CheckLevel::exhaustive |
Private Member Functions | |
std::string | applyEnabled (const std::string &str, bool enable) |
Static Private Member Functions | |
static std::string | parseEnabled (const std::string &str, std::tuple< SimpleEnableGroup< Severity >, SimpleEnableGroup< Checks >> &groups) |
Private Attributes | |
std::map< std::string, std::string > | mMisraRuleTexts |
Static Private Attributes | |
static std::atomic< bool > | mTerminated |
terminate checking More... | |
This is just a container for general settings so that we don't need to pass individual values to functions or constructors now or in the future when we might have even more detailed settings.
Definition at line 95 of file settings.h.
using Settings::ExecuteCmdFn = std::function<int (std::string,std::vector<std::string>,std::string,std::string&)> |
Definition at line 469 of file settings.h.
|
strong |
Enumerator | |
---|---|
normal | |
exhaustive |
Definition at line 461 of file settings.h.
|
strong |
Definition at line 197 of file settings.h.
Settings::Settings | ( | ) |
Definition at line 56 of file settings.cpp.
References certainty, defaultExecutor(), error, executor, exhaustive, getPid(), normal, pid, setCheckLevel(), SimpleEnableGroup< T >::setEnabled(), and severity.
std::string Settings::addEnabled | ( | const std::string & | str | ) |
Enable extra checks by id.
See isEnabled()
str | single id or list of id values to be enabled or empty string to enable all. e.g. "style,possibleError" |
Definition at line 242 of file settings.cpp.
References applyEnabled().
Referenced by CmdLineParser::parseFromArgs().
|
private |
Definition at line 252 of file settings.cpp.
References checks, SimpleEnableGroup< T >::disable(), SimpleEnableGroup< T >::enable(), error, parseEnabled(), and severity.
Referenced by addEnabled(), and removeEnabled().
|
inline |
return true if a included file is to be excluded in Preprocessor::getConfigs
Definition at line 410 of file settings.h.
Referenced by Preprocessor::getConfigs().
|
static |
Definition at line 668 of file settings.cpp.
Referenced by CmdLineParser::parseFromArgs(), and Settings().
std::string Settings::getMisraRuleText | ( | const std::string & | id, |
const std::string & | text | ||
) | const |
Definition at line 661 of file settings.cpp.
References mMisraRuleTexts.
Referenced by CppCheck::executeAddons().
|
static |
Definition at line 159 of file settings.cpp.
Referenced by ErrorMessage::getXMLHeader(), and XmlReportV2::writeHeader().
|
inline |
Is library specified?
Definition at line 439 of file settings.h.
Referenced by CheckClass::constructors(), CheckMemoryLeak::getAllocationType(), CheckMemoryLeak::getDeallocationType(), and CheckMemoryLeak::isOpenDevNull().
bool Settings::isEnabled | ( | const ValueFlow::Value * | value, |
bool | inconclusiveCheck = false |
||
) | const |
Returns true if given value can be shown.
Definition at line 274 of file settings.cpp.
References certainty, ValueFlow::Value::condition, ValueFlow::Value::defaultArg, inconclusive, SimpleEnableGroup< T >::isEnabled(), ValueFlow::Value::isInconclusive(), severity, and warning.
Referenced by CheckType::checkFloatToIntegerOverflow(), CheckType::checkIntegerOverflow(), CheckType::checkTooBigBitwiseShift(), CheckOther::checkZeroDivision(), CheckStl::dereferenceInvalidIteratorError(), CheckNullPointer::nullPointerError(), and CheckUninitVar::uninitvarError().
bool Settings::isPremiumEnabled | ( | const char | id[] | ) | const |
Is checker id enabled by premiumArgs.
Definition at line 608 of file settings.cpp.
References autosarCheckers, certCCheckers, certCppCheckers, misrac2012Checkers, misrac2023Checkers, misracpp2008Checkers, misracpp2023Checkers, and premiumArgs.
Referenced by CheckUnusedVar::allocatedButUnusedVariableError(), CheckCondition::alwaysTrueFalse(), CheckBufferOverrun::argumentSize(), CheckAutoVariables::assignFunctionArg(), CheckCondition::assignIf(), CheckOther::checkAccessOfMovedVariable(), CheckCondition::checkAssignmentInCondition(), CheckCondition::checkBadBitmaskCheck(), CheckExceptionSafety::checkCatchExceptionByValue(), CheckCondition::checkCompareValueOutOfTypeRange(), CheckBool::checkComparisonOfBoolExpressionWithInt(), CheckClass::checkConst(), CheckOther::checkConstPointer(), CheckOther::checkConstVariable(), CheckCondition::checkDuplicateConditionalAssign(), CheckOther::checkDuplicateExpression(), CheckClass::checkDuplInheritedMembers(), CheckClass::checkExplicitConstructors(), CheckMemoryLeakNoVar::checkForUnsafeArgAlloc(), CheckOther::checkFuncArgNamesDifferent(), CheckUnusedVar::checkFunctionVariableUsage(), CheckFunctions::checkIgnoredReturnValue(), CheckCondition::checkIncorrectLogicOperator(), CheckBool::checkIncrementBoolean(), CheckOther::checkKnownArgument(), CheckOther::checkKnownPointerToBool(), CheckType::checkLongCast(), CheckFunctions::checkMathFunctions(), CheckOther::checkMisusedScopedObject(), CheckOther::checkModuloOfOne(), CheckOther::checkNanInArithmeticExpression(), CheckClass::checkOverride(), CheckOther::checkRedundantAssignment(), CheckOther::checkRedundantPointerOp(), CheckExceptionSafety::checkRethrowCopy(), CheckClass::checkReturnByReference(), CheckOther::checkShadowVariables(), CheckOther::checkSignOfUnsignedVariable(), CheckUnusedVar::checkStructMemberUsage(), CheckOther::checkUnreachableCode(), CheckOther::checkUnusedLabel(), CheckClass::checkUselessOverride(), CheckOther::checkVariableScope(), CheckOther::clarifyCalculation(), CheckCondition::clarifyCondition(), CheckCondition::comparison(), CheckClass::constructors(), CheckCondition::duplicateCondition(), CheckClass::initializerListOrder(), CheckIO::invalidLengthModifierError(), CheckIO::invalidScanf(), CheckStl::knownEmptyContainer(), CheckCondition::multiCondition(), CheckCondition::multiCondition2(), CheckNullPointer::nullPointerError(), CheckClass::operatorEqRetRefThis(), CheckClass::operatorEqToSelf(), CheckBufferOverrun::pointerArithmetic(), CheckClass::privateFunctions(), CheckStl::redundantCondition(), CheckSizeof::sizeofFunction(), CheckUnusedVar::unassignedVariableError(), CheckExceptionSafety::unhandledExceptionSpecification(), CheckUnusedVar::unreadVariableError(), CheckMemoryLeakInClass::unsafeClassError(), CheckUnusedVar::unusedVariableError(), CheckStl::useStlAlgorithm(), CheckClass::virtualFunctionCallInConstructorError(), CheckOther::warningOldStylePointerCast(), CheckIO::wrongPrintfScanfArgumentsError(), and CheckIO::wrongPrintfScanfPosixParameterPositionError().
|
static |
Definition at line 65 of file settings.cpp.
References addons, SuppressionList::addSuppressionLine(), cppcheckCfgAbout, cppcheckCfgProductName, exename, Path::getPathFromFilename(), Path::isAbsolute(), Path::isFile(), Path::join(), Suppressions::nomsg, and safety.
Referenced by MainWindow::getCppcheckSettings(), CmdLineParser::isCppcheckPremium(), CmdLineParser::loadCppcheckCfg(), and MainWindow::MainWindow().
void Settings::loadSummaries | ( | ) |
Definition at line 283 of file settings.cpp.
References buildDir, Summaries::loadReturn(), and summaryReturn.
Referenced by CppCheckExecutor::check(), MainWindow::doAnalyzeFiles(), and MainWindow::doAnalyzeProject().
|
staticprivate |
Definition at line 181 of file settings.cpp.
References checks, SimpleEnableGroup< T >::disable(), SimpleEnableGroup< T >::enable(), error, SimpleEnableGroup< T >::fill(), information, internalCheck, missingInclude, performance, portability, severity, style, unusedFunction, and warning.
Referenced by applyEnabled().
std::string Settings::removeEnabled | ( | const std::string & | str | ) |
Disable extra checks by id.
str | single id or list of id values to be enabled or empty string to enable all. e.g. "style,possibleError" |
Definition at line 247 of file settings.cpp.
References applyEnabled().
Referenced by CmdLineParser::parseFromArgs().
void Settings::setCheckLevel | ( | CheckLevel | level | ) |
Definition at line 288 of file settings.cpp.
References checkLevel, exhaustive, normal, performanceValueFlowMaxIfCount, and performanceValueFlowMaxSubFunctionArgs.
Referenced by MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), CmdLineParser::parseFromArgs(), and Settings().
void Settings::setMisraRuleTexts | ( | const ExecuteCmdFn & | executeCommand | ) |
Definition at line 625 of file settings.cpp.
References addonInfos, and premiumArgs.
Referenced by CppCheckExecutor::check(), and MainWindow::getCppcheckSettings().
void Settings::setMisraRuleTexts | ( | const std::string & | data | ) |
Definition at line 644 of file settings.cpp.
References mMisraRuleTexts.
|
inlinestatic |
Request termination of checking.
Definition at line 444 of file settings.h.
References mTerminated.
Referenced by MainWindow::analyzeFiles(), MainWindow::analyzeProject(), CmdLineParser::fillSettingsFromArgs(), MainWindow::getCppcheckSettings(), and CheckThread::stop().
|
inlinestatic |
termination requested?
Definition at line 449 of file settings.h.
References mTerminated.
Referenced by CppCheckExecutor::check(), CppCheck::checkFile(), CppCheck::checkNormalTokens(), Tokenizer::setVarIdPass1(), Tokenizer::simplifyTokenList1(), Tokenizer::simplifyTypedefCpp(), Tokenizer::simplifyUsing(), and valueFlowGenericForward().
|
inline |
Definition at line 457 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), CppCheck::checkFile(), CppCheck::checkNormalTokens(), CmdLineParser::parseFromArgs(), and CppCheckExecutor::reportSuppressions().
std::vector<AddonInfo> Settings::addonInfos |
the loaded addons infos
Definition at line 112 of file settings.h.
Referenced by CppCheck::executeAddons(), MainWindow::loadAddon(), CmdLineParser::loadAddons(), and setMisraRuleTexts().
std::string Settings::addonPython |
Path to the python interpreter to be used to run addons.
Definition at line 115 of file settings.h.
Referenced by CppCheck::executeAddons(), and CmdLineParser::parseFromArgs().
std::unordered_set<std::string> Settings::addons |
addons, either filename of python/json file or json data
Definition at line 109 of file settings.h.
Referenced by ThreadHandler::check(), CppCheck::checkFile(), CheckersReport::countCheckers(), createDumpFile(), CppCheck::executeAddons(), CppCheck::executeAddonsWholeProgram(), MainWindow::getCppcheckSettings(), CheckersReport::getReport(), ImportProject::importCppcheckGuiProject(), MainWindow::loadAddon(), CmdLineParser::loadAddons(), loadCppcheckCfg(), and CmdLineParser::parseFromArgs().
std::vector<std::string> Settings::basePaths |
Paths used as base for conversion to relative paths.
Definition at line 118 of file settings.h.
Referenced by addInlineSuppressions(), CppCheck::checkFile(), TokenList::createTokens(), Tokenizer::dump(), Preprocessor::error(), CppCheck::getDumpFileContentsRawTokens(), ImportProject::importCppcheckGuiProject(), and CmdLineParser::parseFromArgs().
std::string Settings::buildDir |
–cppcheck-build-dir.
Always uses / as path separator. No trailing path separator.
Definition at line 121 of file settings.h.
Referenced by CppCheck::analyseClangTidy(), CppCheckExecutor::check_internal(), CppCheck::checkClang(), CppCheck::checkFile(), CppCheck::checkNormalTokens(), Summaries::create(), MainWindow::doAnalyzeFiles(), MainWindow::doAnalyzeProject(), CppCheck::executeAddonsWholeProgram(), MainWindow::getCppcheckSettings(), getDumpFileName(), ImportProject::importCppcheckGuiProject(), loadSummaries(), CmdLineParser::parseFromArgs(), CppCheck::removeCtuInfoFiles(), CppCheck::reportErr(), CheckThread::run(), CheckThread::runAddonsAndTools(), and Tokenizer::simplifyTokens1().
SimpleEnableGroup<Certainty> Settings::certainty |
Definition at line 359 of file settings.h.
Referenced by CheckNullPointer::arithmetic(), CheckAutoVariables::autoVariables(), LifetimeStore::byDerefCopy(), LifetimeStore::byRef(), LifetimeStore::byVal(), CheckOther::checkAccessOfMovedVariable(), CheckBool::checkBitwiseOnBoolean(), CheckClass::checkConst(), CheckStl::checkDereferenceInvalidIterator2(), CheckOther::checkDuplicateBranch(), CheckOther::checkDuplicateExpression(), CheckMemoryLeakNoVar::checkForUnsafeArgAlloc(), CheckOther::checkFuncArgNamesDifferent(), CheckOther::checkIncompleteArrayFill(), CheckOther::checkIncompleteStatement(), CheckCondition::checkIncorrectLogicOperator(), CheckOther::checkInvalidFree(), CheckOther::checkPassByReference(), CheckOther::checkRedundantAssignment(), CheckOther::checkRedundantCopy(), CheckOther::checkSuspiciousCaseInSwitch(), CheckOther::checkSuspiciousSemicolon(), CheckOther::checkUnreachableCode(), CheckAutoVariables::checkVarLifetimeScope(), CheckClass::constructors(), CheckExceptionSafety::deallocThrow(), MainWindow::getCppcheckSettings(), Token::getInvalidValue(), CheckClass::initializerListOrder(), CheckOther::invalidPointerCast(), CheckIO::invalidScanfFormatWidthError(), isEnabled(), CheckStl::iterators(), CheckNullPointer::nullPointerByDeRefAndChec(), CheckStl::outOfBounds(), CmdLineParser::parseFromArgs(), Settings(), CheckSizeof::sizeofCalculation(), CheckStl::string_c_str(), CheckBufferOverrun::stringNotZeroTerminated(), CheckSizeof::suspiciousSizeofCalculation(), CheckExceptionSafety::unhandledExceptionSpecification(), valueFlowLifetime(), and CheckClass::virtualDestructor().
bool Settings::checkAllConfigurations = true |
check all configurations (false if -D or –max-configs is used
Definition at line 124 of file settings.h.
Referenced by CppCheck::checkFile(), MainWindow::getCppcheckSettings(), and CmdLineParser::parseFromArgs().
bool Settings::checkConfiguration {} |
Is the 'configuration checking' wanted?
Definition at line 127 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), Tokenizer::checkConfiguration(), CppCheck::checkFile(), MainWindow::doAnalyzeFiles(), MainWindow::doAnalyzeProject(), and CmdLineParser::parseFromArgs().
std::string Settings::checkersReportFilename |
–checkers-report=<filename> : Generate report of executed checkers
Definition at line 141 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), and CmdLineParser::parseFromArgs().
bool Settings::checkHeaders = true |
Check code in the headers, this is on by default but can be turned off to save CPU.
Definition at line 132 of file settings.h.
Referenced by MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), and Tokenizer::simplifyHeadersAndUnusedTemplates().
CheckLevel Settings::checkLevel = CheckLevel::exhaustive |
Definition at line 465 of file settings.h.
Referenced by setCheckLevel(), and valueFlowConditionExpressions().
bool Settings::checkLibrary {} |
Check for incomplete info in library files?
Definition at line 135 of file settings.h.
Referenced by CheckUnusedVar::checkFunctionVariableUsage(), CheckFunctions::checkLibraryMatchFunctions(), CheckLeakAutoVar::configurationInfo(), MainWindow::doAnalyzeFiles(), MainWindow::doAnalyzeProject(), Tokenizer::isScopeNoReturn(), and CmdLineParser::parseFromArgs().
SimpleEnableGroup<Checks> Settings::checks |
Definition at line 360 of file settings.h.
Referenced by CppCheck::analyseWholeProgram(), applyEnabled(), CppCheck::check(), CppCheckExecutor::check_internal(), CppCheck::checkClang(), CppCheck::checkFile(), CppCheck::checkNormalTokens(), MainWindow::getCppcheckSettings(), Preprocessor::missingInclude(), parseEnabled(), CmdLineParser::parseFromArgs(), and CheckInternal::runChecks().
int Settings::checksMaxTime {} |
The maximum time in seconds for the checks of a single file.
Definition at line 138 of file settings.h.
Referenced by CppCheck::checkNormalTokens(), and CmdLineParser::parseFromArgs().
std::set<std::string> Settings::checkUnknownFunctionReturn |
check unknown function return values
Definition at line 144 of file settings.h.
Referenced by MainWindow::getCppcheckSettings(), and valueFlowUnknownFunctionReturn().
bool Settings::checkUnusedTemplates = true |
Check unused/uninstantiated templates.
Definition at line 147 of file settings.h.
Referenced by MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), and Tokenizer::simplifyHeadersAndUnusedTemplates().
bool Settings::clang {} |
Use Clang.
Definition at line 150 of file settings.h.
Referenced by CheckLeakAutoVar::check(), CheckMemoryLeakStructMember::check(), CppCheck::check(), CppCheck::checkNormalTokens(), CheckOther::checkVariableScope(), MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), parsedecl(), CmdLineParser::parseFromArgs(), and CheckVaarg::va_list_usage().
std::string Settings::clangExecutable = "clang" |
Custom Clang executable.
Definition at line 153 of file settings.h.
Referenced by CppCheck::checkClang(), and CmdLineParser::parseFromArgs().
bool Settings::clangTidy {} |
Use clang-tidy.
Definition at line 156 of file settings.h.
Referenced by ProcessExecutor::check(), SingleExecutor::check(), ThreadData::check(), and ImportProject::importCppcheckGuiProject().
bool Settings::clearIncludeCache {} |
Internal: Clear the simplecpp non-existing include cache.
Definition at line 159 of file settings.h.
Referenced by createDUI().
std::set<std::string> Settings::configExcludePaths |
include paths excluded from checking the configuration
Definition at line 162 of file settings.h.
Referenced by CmdLineParser::parseFromArgs().
std::string Settings::cppcheckCfgAbout |
cppcheck.cfg: About text
Definition at line 168 of file settings.h.
Referenced by loadCppcheckCfg(), and MainWindow::MainWindow().
std::string Settings::cppcheckCfgProductName |
cppcheck.cfg: Custom product name
Definition at line 165 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), CmdLineParser::getVersion(), CmdLineParser::isCppcheckPremium(), isCppcheckPremium(), loadCppcheckCfg(), MainWindow::MainWindow(), and CmdLineParser::parseFromArgs().
bool Settings::daca {} |
Are we running from DACA script?
Definition at line 171 of file settings.h.
Referenced by CheckFunctions::checkProhibitedFunctions(), CheckOther::checkVariableScope(), CmdLineParser::parseFromArgs(), Tokenizer::simplifyTokenList1(), valueFlowConditionExpressions(), and Check::wrongData().
bool Settings::debugnormal {} |
Is –debug-normal given?
Definition at line 174 of file settings.h.
Referenced by LifetimeStore::byRef(), LifetimeStore::byVal(), CppCheck::checkClang(), SymbolDatabase::debugSymbolDatabase(), makeConditionValue(), parsedecl(), CmdLineParser::parseFromArgs(), Tokenizer::printDebugOutput(), setTokenValue(), SymbolDatabase::setValueType(), TemplateSimplifier::simplifyTemplates(), Tokenizer::simplifyTokens1(), valueFlowDebug(), valueFlowForward(), valueFlowForwardRecursive(), and valueFlowReverse().
bool Settings::debugSimplified {} |
Is –debug-simplified given?
Definition at line 177 of file settings.h.
Referenced by CmdLineParser::parseFromArgs(), and Tokenizer::printDebugOutput().
bool Settings::debugtemplate {} |
Is –debug-template given?
Definition at line 180 of file settings.h.
Referenced by TemplateSimplifier::getTemplateNamePosition(), CmdLineParser::parseFromArgs(), and TemplateSimplifier::simplifyTemplates().
bool Settings::debugwarnings {} |
Is –debug-warnings given?
Definition at line 183 of file settings.h.
Referenced by ConditionHandler::afterCondition(), ConditionHandler::beforeCondition(), CppCheck::checkFile(), CppCheck::checkNormalTokens(), CheckUninitVar::checkScopeForVariable(), CheckOther::constStatementError(), SymbolDatabase::createSymbolDatabaseNeedInitialization(), SymbolDatabase::debugMessage(), SymbolDatabase::debugSymbolDatabase(), LifetimeStore::fromFunctionArg(), MainWindow::getCppcheckSettings(), parsedecl(), CmdLineParser::parseFromArgs(), Tokenizer::printDebugOutput(), SymbolDatabase::setValueType(), SymbolDatabase::setValueTypeInTokenList(), TemplateSimplifier::simplifyTemplateInstantiations(), TemplateSimplifier::simplifyTemplates(), Tokenizer::simplifyTypedefCpp(), Tokenizer::simplifyUsing(), Tokenizer::simplifyUsingError(), Tokenizer::unsupportedTypedef(), TemplateSimplifier::useDefaultArgumentValues(), SymbolDatabase::validate(), valueFlowConditionExpressions(), valueFlowDebug(), valueFlowForLoopSimplify(), valueFlowFunctionReturn(), valueFlowInjectParameter(), and valueFlowSwitchVariable().
bool Settings::dump {} |
Is –dump given?
Definition at line 186 of file settings.h.
Referenced by CppCheck::checkFile(), createDumpFile(), getDumpFileName(), and CmdLineParser::parseFromArgs().
std::string Settings::dumpFile |
Definition at line 187 of file settings.h.
Referenced by getDumpFileName().
Standards::Language Settings::enforcedLang {} |
Name of the language that is enforced.
Empty per default.
Definition at line 190 of file settings.h.
Referenced by createDumpFile(), MainWindow::getCppcheckSettings(), CmdLineParser::parseFromArgs(), and TokenList::TokenList().
ExecutorType Settings::executor |
Definition at line 207 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), CmdLineParser::parseFromArgs(), and Settings().
std::string Settings::exename |
Definition at line 210 of file settings.h.
Referenced by MainWindow::getCppcheckSettings(), MainWindow::loadAddon(), CmdLineParser::loadAddons(), loadCppcheckCfg(), CmdLineParser::loadLibraries(), MainWindow::MainWindow(), and CmdLineParser::parseFromArgs().
int Settings::exitCode {} |
If errors are found, this value is returned from main().
Default value is 0.
Definition at line 214 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), and CmdLineParser::parseFromArgs().
std::vector<std::string> Settings::fileFilters |
List of –file-filter for analyzing special files.
Definition at line 217 of file settings.h.
Referenced by CmdLineParser::fillSettingsFromArgs(), ImportProject::import(), and CmdLineParser::parseFromArgs().
bool Settings::force {} |
Force checking the files with "too many" configurations (–force).
Definition at line 220 of file settings.h.
Referenced by CppCheck::checkFile(), MainWindow::doAnalyzeProject(), MainWindow::getCppcheckSettings(), Preprocessor::handleErrors(), and CmdLineParser::parseFromArgs().
std::list<std::string> Settings::includePaths |
List of include paths, e.g.
"my/includes/" which should be used for finding include files inside source files. (-I)
Definition at line 224 of file settings.h.
Referenced by MainWindow::addIncludeDirs(), CppCheck::check(), CppCheck::checkClang(), CppCheck::checkFile(), createDUI(), CmdLineParser::fillSettingsFromArgs(), ImportProject::importCppcheckGuiProject(), and CmdLineParser::parseFromArgs().
bool Settings::inlineSuppressions {} |
Is –inline-suppr given?
Definition at line 227 of file settings.h.
Referenced by MainWindow::getCppcheckSettings(), Preprocessor::inlineSuppressions(), and CmdLineParser::parseFromArgs().
unsigned int Settings::jobs = 1 |
How many processes/threads should do checking at the same time.
Default is 1. (-j N)
Definition at line 231 of file settings.h.
Referenced by ProcessExecutor::check(), ThreadExecutor::check(), ThreadHandler::check(), MainWindow::getCppcheckSettings(), CmdLineParser::parseFromArgs(), ProcessExecutor::ProcessExecutor(), SingleExecutor::SingleExecutor(), and ThreadExecutor::ThreadExecutor().
std::list<std::string> Settings::libraries |
–library=
Definition at line 234 of file settings.h.
Referenced by MainWindow::getCppcheckSettings(), CmdLineParser::loadLibraries(), and CmdLineParser::parseFromArgs().
Library Settings::library |
Definition at line 237 of file settings.h.
Referenced by ConditionHandler::afterCondition(), CheckUnusedFunctions::analyseWholeProgram(), Variable::arrayDimensions(), CheckAssert::assertWithSideEffects(), astFunctionYield(), CheckAutoVariables::autoVariables(), CheckBufferOverrun::bufferOverflow(), CheckLeakAutoVar::changeAllocStatusIfRealloc(), CheckUnusedFunctions::check(), CheckBool::checkBitwiseOnBoolean(), checkBufferSize(), CheckOther::checkComparePointers(), CheckClass::checkConst(), CheckClass::checkConstFunc(), CheckOther::checkConstPointer(), CheckOther::checkDuplicateExpression(), CppCheck::checkFile(), CheckIO::checkFileUsage(), CheckMemoryLeakNoVar::checkForUnreleasedInputArgument(), CheckMemoryLeakNoVar::checkForUnusedReturnValue(), CheckUnusedVar::checkFunctionVariableUsage(), CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(), CheckFunctions::checkIgnoredReturnValue(), CheckOther::checkInnerScope(), CheckOther::checkInvalidFree(), CheckFunctions::checkLibraryMatchFunctions(), CheckClass::checkMemset(), CheckClass::checkMemsetType(), CheckFunctions::checkMissingReturn(), CheckOther::checkMisusedScopedObject(), CheckOther::checkOverlappingWrite(), CheckFunctions::checkProhibitedFunctions(), CheckMemoryLeakInFunction::checkReallocUsage(), FwdAnalysis::checkRecursive(), CheckOther::checkRedundantCopy(), CheckClass::checkReturnByReference(), CheckClass::checkReturnPtrThis(), CheckUninitVar::checkScope(), CheckLeakAutoVar::checkScope(), CheckUninitVar::checkScopeForVariable(), CheckSizeof::checkSizeofForPointerSize(), CheckMemoryLeakStructMember::checkStructVariable(), CheckLeakAutoVar::checkTokenInsideExpression(), CheckOther::checkUnreachableCode(), CheckAutoVariables::checkVarLifetimeScope(), CheckIO::checkWrongPrintfScanfArguments(), CheckLeakAutoVar::configurationInfo(), CheckClass::constructors(), CheckClass::copyconstructors(), createDUI(), SymbolDatabase::createSymbolDatabaseEscapeFunctions(), SymbolDatabase::createSymbolDatabaseIncompleteVars(), SymbolDatabase::createSymbolDatabaseSetVariablePointers(), Tokenizer::dump(), Variable::evaluate(), CmdLineParser::fillSettingsFromArgs(), findExpressionChangedSkipDeadCode(), ValueType::fromLibraryType(), CheckLeakAutoVar::functionCall(), CheckMemoryLeak::getAllocationType(), getCastTypeStartToken(), getContainerYield(), MainWindow::getCppcheckSettings(), CheckMemoryLeak::getDeallocationType(), CheckFunctions::getErrorMessages(), getFunctionUsage(), Token::getInvalidValue(), getOutparamAllocation(), CheckMemoryLeak::getReallocationType(), CheckClass::getVirtualFunctionCalls(), CheckClass::hasAllocation(), Executor::hasToLog(), CheckStl::if_find(), CheckStl::invalidContainer(), CheckFunctions::invalidFunctionUsage(), isArrayArg(), isEscapeScope(), CheckUninitVar::isFunctionParUsage(), CheckIO::ArgumentInfo::isLibraryType(), CheckMemoryLeakStructMember::isMalloc(), CheckUninitVar::isMemberVariableAssignment(), CheckNullPointer::isPointerDeRef(), CheckMemoryLeak::isReopenStandardStream(), isSameExpression(), isSameIteratorContainerExpression(), Tokenizer::isScopeNoReturn(), isSimpleExpr(), isVariableChanged(), isVariableChangedByFunctionCall(), isVariableUsage(), CheckUninitVar::isVariableUsage(), CheckStl::knownEmptyContainer(), CmdLineParser::loadLibraries(), CheckStl::mismatchingContainers(), CheckCondition::multiCondition2(), CheckStl::negativeIndex(), CheckNullPointer::nullConstantDereference(), SymbolicConditionHandler::parse(), ContainerConditionHandler::parse(), parsedecl(), CheckUnusedFunctions::parseTokens(), programMemoryParseCondition(), CppCheck::reportErr(), setTokenValue(), SymbolDatabase::setValueType(), SymbolDatabase::setValueTypeInTokenList(), Tokenizer::simplifyTokenList1(), Tokenizer::sizeOfType(), CheckStl::stlBoundaries(), ConditionHandler::traverseCondition(), CheckExceptionSafety::unhandledExceptionSpecification(), CheckOther::unreachableCodeError(), CheckFunctions::useStandardLibrary(), CheckStl::useStlAlgorithm(), valueFlowConditionExpressions(), valueFlowDynamicBufferSize(), valueFlowForwardLifetime(), valueFlowLifetimeFunction(), valueFlowSubFunction(), valueFlowSymbolic(), valueFlowUninit(), valueFlowUnknownFunctionReturn(), and CheckMemoryLeakInClass::variable().
int Settings::loadAverage {} |
Load average value.
Definition at line 240 of file settings.h.
Referenced by ProcessExecutor::checkLoadAverage(), and CmdLineParser::parseFromArgs().
int Settings::maxConfigs = 12 |
Maximum number of configurations to check before bailing.
Default is 12. (–max-configs=N)
Definition at line 244 of file settings.h.
Referenced by CppCheck::checkFile(), MainWindow::getCppcheckSettings(), CmdLineParser::parseFromArgs(), and CppCheck::tooManyConfigsError().
int Settings::maxCtuDepth = 2 |
–max-ctu-depth
Definition at line 247 of file settings.h.
Referenced by CppCheck::analyseWholeProgram(), ProjectFile::clear(), MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), and CmdLineParser::parseFromArgs().
int Settings::maxTemplateRecursion = 100 |
max template recursion
Definition at line 250 of file settings.h.
Referenced by ProjectFile::clear(), MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), and TemplateSimplifier::simplifyTemplateInstantiations().
|
private |
Definition at line 479 of file settings.h.
Referenced by getMisraRuleText(), and setMisraRuleTexts().
|
staticprivate |
terminate checking
Definition at line 99 of file settings.h.
Referenced by terminate(), and terminated().
std::string Settings::outputFile |
write results (–output-file=<file>)
Definition at line 253 of file settings.h.
Referenced by CmdLineParser::parseFromArgs().
int Settings::performanceValueFlowMaxIfCount = -1 |
–performance-valueflow-max-if-count=C
Definition at line 261 of file settings.h.
Referenced by CmdLineParser::parseFromArgs(), and setCheckLevel().
int Settings::performanceValueFlowMaxSubFunctionArgs = 256 |
max number of sets of arguments to pass to subfuncions in valueflow
Definition at line 264 of file settings.h.
Referenced by productParams(), and setCheckLevel().
int Settings::performanceValueFlowMaxTime = -1 |
Experimental: –performance-valueflow-max-time=T.
Definition at line 258 of file settings.h.
Referenced by CmdLineParser::parseFromArgs().
int Settings::pid |
pid of cppcheck.
Intention is that this is set in the main process.
Definition at line 267 of file settings.h.
Referenced by CppCheck::executeAddons(), getDumpFileName(), and Settings().
Platform Settings::platform |
Definition at line 255 of file settings.h.
Referenced by CheckIO::ArgumentInfo::ArgumentInfo(), CppCheck::check(), CheckCondition::checkCompareValueOutOfTypeRange(), CppCheck::checkFile(), CheckIO::checkFileUsage(), CheckType::checkFloatToIntegerOverflow(), CheckIO::checkFormatString(), CheckMemoryLeakNoVar::checkForUnreleasedInputArgument(), CheckOther::checkIncompleteArrayFill(), CheckType::checkIntegerOverflow(), CheckOther::checkInterlockedDecrement(), CheckType::checkLongCast(), CheckOther::checkPassByReference(), CheckOther::checkRedundantCopy(), CheckClass::checkReturnByReference(), CheckType::checkTooBigBitwiseShift(), CheckIO::checkWrongPrintfScanfArguments(), Tokenizer::combineStringAndCharLiterals(), createDUI(), createDumpFile(), Tokenizer::fillTypeSizes(), ValueType::fromLibraryType(), getAlignOf(), CheckBufferOverrun::getBufferSize(), MainWindow::getCppcheckSettings(), getDimensionsEtc(), CTU::getFileInfo(), getMinMaxValues(), ValueFlow::getSizeOf(), CheckBufferOverrun::isCtuUnsafeBufferUsage(), CheckFunctions::memsetInvalid2ndParam(), CheckBufferOverrun::objectIndex(), ValueType::parseDecl(), parsedecl(), CmdLineParser::parseFromArgs(), CheckLeakAutoVar::ret(), SymbolDatabase::setArrayDimensionsUsingValueFlow(), Preprocessor::setPlatformInfo(), setTokenValueCast(), setValues(), SymbolDatabase::setValueType(), SymbolDatabase::setValueTypeInTokenList(), SymbolDatabase::sizeOfType(), Tokenizer::sizeOfType(), SymbolDatabase::SymbolDatabase(), valueFlowDynamicBufferSize(), valueFlowRightShift(), valueFlowSafeFunctions(), and valueFlowSetConstantValue().
std::string Settings::plistOutput |
plist output (–plist-output=<dir>)
Definition at line 270 of file settings.h.
Referenced by CppCheck::checkFile(), CmdLineParser::parseFromArgs(), and CppCheck::reportErr().
std::string Settings::premiumArgs |
Extra arguments for Cppcheck Premium addon.
Definition at line 273 of file settings.h.
Referenced by CheckersReport::countCheckers(), CppCheck::executeAddons(), MainWindow::getCppcheckSettings(), CheckersReport::getReport(), ImportProject::importCppcheckGuiProject(), CppCheck::isPremiumCodingStandardId(), isPremiumEnabled(), CmdLineParser::parseFromArgs(), and setMisraRuleTexts().
bool Settings::preprocessOnly {} |
Using -E for debugging purposes.
Definition at line 279 of file settings.h.
Referenced by CppCheck::checkFile(), and CmdLineParser::parseFromArgs().
bool Settings::quiet {} |
Is –quiet given?
Definition at line 282 of file settings.h.
Referenced by ProcessExecutor::check(), SingleExecutor::check(), CppCheck::checkClang(), CppCheck::checkFile(), MainWindow::getCppcheckSettings(), CmdLineParser::parseFromArgs(), and ThreadData::status().
bool Settings::relativePaths {} |
Use relative paths in output.
Definition at line 285 of file settings.h.
Referenced by addInlineSuppressions(), CppCheck::checkFile(), TokenList::createTokens(), Preprocessor::error(), ImportProject::importCppcheckGuiProject(), and CmdLineParser::parseFromArgs().
int Settings::reportProgress {-1} |
–report-progress
Definition at line 288 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), and CmdLineParser::parseFromArgs().
SafeChecks Settings::safeChecks |
Definition at line 356 of file settings.h.
Referenced by CheckClass::checkUnsafeClassRefMember(), MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), and Function::isSafe().
bool Settings::safety = false |
Safety certified behavior Show checkers report when Cppcheck finishes Make cppcheck checking more strict about critical errors.
Definition at line 313 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), loadCppcheckCfg(), CmdLineParser::parseFromArgs(), and CppCheck::reportErr().
SimpleEnableGroup<Severity> Settings::severity |
Definition at line 358 of file settings.h.
Referenced by CheckUnusedVar::allocatedButUnusedVariableError(), CheckCondition::alwaysTrueFalse(), CheckNullPointer::analyseWholeProgram(), applyEnabled(), CheckBufferOverrun::argumentSize(), CheckNullPointer::arithmetic(), CheckBufferOverrun::arrayIndexError(), CheckBufferOverrun::arrayIndexThenCheck(), CheckAssert::assertWithSideEffects(), CheckAutoVariables::assignFunctionArg(), CheckCondition::assignIf(), CppCheckExecutor::check_internal(), CheckOther::checkAccessOfMovedVariable(), CheckString::checkAlwaysTrueOrFalseStringCompare(), CheckBool::checkAssignBoolToFloat(), CheckCondition::checkAssignmentInCondition(), CheckCondition::checkBadBitmaskCheck(), CheckBool::checkBitwiseOnBoolean(), CheckOther::checkCastIntToCharAndBack(), CheckExceptionSafety::checkCatchExceptionByValue(), CheckOther::checkCharVariable(), CheckOther::checkCommaSeparatedReturn(), CheckCondition::checkCompareValueOutOfTypeRange(), CheckOther::checkComparisonFunctionIsAlwaysTrueOrFalse(), CheckBool::checkComparisonOfBoolExpressionWithInt(), CheckBool::checkComparisonOfBoolWithBool(), CheckBool::checkComparisonOfBoolWithInt(), CheckBool::checkComparisonOfFuncReturningBool(), CheckClass::checkConst(), CheckOther::checkConstPointer(), CheckOther::checkConstVariable(), CheckClass::checkCopyCtorAndEqOperator(), CheckStl::checkDereferenceInvalidIterator(), CheckOther::checkDuplicateBranch(), CheckCondition::checkDuplicateConditionalAssign(), CheckOther::checkDuplicateExpression(), CheckClass::checkDuplInheritedMembers(), CheckOther::checkEvaluationOrder(), CheckClass::checkExplicitConstructors(), CppCheck::checkFile(), CheckIO::checkFileUsage(), CheckStl::checkFindInsert(), CheckIO::checkFormatString(), CheckMemoryLeakNoVar::checkForUnsafeArgAlloc(), CheckOther::checkFuncArgNamesDifferent(), CheckUnusedVar::checkFunctionVariableUsage(), CheckFunctions::checkIgnoredReturnValue(), CheckOther::checkIncompleteArrayFill(), CheckOther::checkIncompleteStatement(), CheckCondition::checkIncorrectLogicOperator(), CheckString::checkIncorrectStringCompare(), CheckBool::checkIncrementBoolean(), CheckCondition::checkInvalidTestForOverflow(), CheckOther::checkKnownArgument(), CheckOther::checkKnownPointerToBool(), CheckType::checkLongCast(), CheckFunctions::checkMathFunctions(), CheckClass::checkMemset(), CheckClass::checkMemsetType(), CheckOther::checkMisusedScopedObject(), CheckCondition::checkModuloAlwaysTrueFalse(), CheckOther::checkModuloOfOne(), CheckStl::checkMutexes(), CheckOther::checkNanInArithmeticExpression(), CheckOther::checkNegativeBitwiseShift(), CheckClass::checkOverride(), CheckOther::checkPassByReference(), CheckCondition::checkPointerAdditionResultNotNull(), CheckFunctions::checkProhibitedFunctions(), CheckMemoryLeakInClass::checkPublicFunctions(), CheckOther::checkRedundantAssignment(), CheckOther::checkRedundantCopy(), CheckOther::checkRedundantPointerOp(), CheckExceptionSafety::checkRethrowCopy(), CheckClass::checkReturnByReference(), CheckOther::checkShadowVariables(), CheckType::checkSignConversion(), CheckOther::checkSignOfUnsignedVariable(), CheckSizeof::checkSizeofForArrayParameter(), CheckSizeof::checkSizeofForNumericParameter(), CheckSizeof::checkSizeofForPointerSize(), CheckUnusedVar::checkStructMemberUsage(), CheckOther::checkSuspiciousCaseInSwitch(), CheckOther::checkSuspiciousSemicolon(), CheckString::checkSuspiciousStringCompare(), CheckClass::checkThisUseAfterFree(), CheckOther::checkUnreachableCode(), CheckClass::checkUnsafeClassRefMember(), CheckOther::checkUnusedLabel(), CheckClass::checkUselessOverride(), CheckOther::checkVarFuncNullUB(), CheckOther::checkVariableScope(), CheckClass::checkVirtualFunctionCallInConstructor(), CheckOther::clarifyCalculation(), CheckCondition::clarifyCondition(), CheckOther::clarifyStatement(), CheckCondition::comparison(), CheckClass::constructors(), CheckClass::copyconstructors(), CheckExceptionSafety::deallocThrow(), CheckExceptionSafety::destructors(), CheckCondition::duplicateCondition(), CppCheck::executeAddons(), CmdLineParser::fillSettingsFromArgs(), MainWindow::getCppcheckSettings(), CppCheck::getErrorMessages(), Token::getInvalidValue(), CheckStl::if_find(), CheckClass::initializationListUsage(), CheckClass::initializerListOrder(), CheckIO::invalidLengthModifierError(), CheckOther::invalidPointerCast(), CheckIO::invalidPrintfArgTypeError_float(), CheckIO::invalidPrintfArgTypeError_n(), CheckIO::invalidPrintfArgTypeError_p(), CheckIO::invalidPrintfArgTypeError_s(), CheckIO::invalidPrintfArgTypeError_sint(), CheckIO::invalidPrintfArgTypeError_uint(), CheckIO::invalidScanf(), CheckIO::invalidScanfArgTypeError_float(), CheckIO::invalidScanfArgTypeError_int(), CheckIO::invalidScanfArgTypeError_s(), CheckIO::invalidScanfFormatWidthError(), isEnabled(), CheckStl::knownEmptyContainer(), CheckFunctions::memsetInvalid2ndParam(), CheckFunctions::memsetZeroBytes(), CheckStl::missingComparison(), CheckCondition::multiCondition(), CheckCondition::multiCondition2(), CheckBufferOverrun::negativeIndexError(), CheckClass::operatorEqRetRefThis(), CheckClass::operatorEqToSelf(), CheckStl::outOfBounds(), CheckString::overlappingStrcmp(), parseEnabled(), CheckBufferOverrun::pointerArithmetic(), Check64BitPortability::pointerassignment(), CheckPostfixOperator::postfixOperator(), CheckClass::privateFunctions(), CppCheck::purgedConfigurationMessage(), CheckOther::redundantBitwiseOperationInSwitchError(), CheckStl::redundantCondition(), SymbolDatabase::returnImplicitIntError(), CheckFunctions::returnLocalStdMove(), CheckBool::returnValueOfFunctionReturningBool(), Settings(), TemplateSimplifier::simplifyTemplateInstantiations(), Tokenizer::simplifyTokenList1(), Tokenizer::simplifyTokens1(), Tokenizer::simplifyTypedef(), CheckStl::size(), CheckSizeof::sizeofCalculation(), CheckSizeof::sizeofFunction(), CheckSizeof::sizeofsizeof(), CheckSizeof::sizeofVoid(), CheckStl::string_c_str(), CheckBufferOverrun::stringNotZeroTerminated(), CheckSizeof::suspiciousSizeofCalculation(), CheckClass::thisSubtraction(), CheckType::tooBigSignedBitwiseShiftError(), CppCheck::tooManyConfigsError(), CheckUnusedVar::unassignedVariableError(), CheckExceptionSafety::unhandledExceptionSpecification(), CheckUnusedVar::unreadVariableError(), CheckMemoryLeakInClass::unsafeClassError(), CheckOther::unusedLabelError(), CheckUnusedVar::unusedVariableError(), TemplateSimplifier::useDefaultArgumentValues(), CheckStl::uselessCalls(), CheckFunctions::useStandardLibrary(), CheckStl::useStlAlgorithm(), CheckVaarg::va_start_argument(), CheckClass::virtualDestructorError(), CheckClass::virtualFunctionCallInConstructorError(), CheckOther::warningOldStylePointerCast(), CheckIO::wrongPrintfScanfArgumentsError(), and CheckIO::wrongPrintfScanfPosixParameterPositionError().
SHOWTIME_MODES Settings::showtime {} |
show timing information (–showtime=file|summary|top5)
Definition at line 363 of file settings.h.
Referenced by ProcessExecutor::check(), SingleExecutor::check(), ThreadExecutor::check(), CppCheck::checkFile(), CppCheck::checkNormalTokens(), CmdLineParser::parseFromArgs(), Tokenizer::simplifyTokenList1(), and Tokenizer::simplifyTokens1().
Standards Settings::standards |
Struct contains standards settings.
Definition at line 366 of file settings.h.
Referenced by CppCheck::check(), CheckOther::checkAccessOfMovedVariable(), CppCheck::checkClang(), CheckOther::checkDuplicateExpression(), CheckOther::checkEvaluationOrder(), CheckClass::checkExplicitConstructors(), CppCheck::checkFile(), CheckStl::checkFindInsert(), CheckStl::checkFindInsertError(), CheckFunctions::checkMathFunctions(), CheckFunctions::checkMissingReturn(), CheckClass::checkOverride(), CheckFunctions::checkProhibitedFunctions(), Scope::checkVariable(), CheckClass::constructors(), createDUI(), MainWindow::getCppcheckSettings(), CheckStl::if_findError(), Scope::isVariableDeclaration(), CmdLineParser::parseFromArgs(), Tokenizer::removePragma(), SymbolDatabase::returnImplicitIntError(), CheckFunctions::returnLocalStdMove(), CheckThread::runAddonsAndTools(), SymbolDatabase::setValueType(), SymbolDatabase::setValueTypeInTokenList(), Tokenizer::setVarIdPass1(), Tokenizer::simplifyIfSwitchForInit(), TemplateSimplifier::simplifyTemplates(), Tokenizer::simplifyUsing(), Tokenizer::simplifyUsingToTypedef(), Tokenizer::simplifyVarDecl(), CheckStl::size(), CheckType::tooBigSignedBitwiseShiftError(), valueFlowAfterMove(), valueFlowSetConstantValue(), and CheckClass::virtualDestructor().
std::set<std::string> Settings::summaryReturn |
Definition at line 453 of file settings.h.
Referenced by Tokenizer::isScopeNoReturn(), and loadSummaries().
Suppressions Settings::supprs |
suppressions
Definition at line 369 of file settings.h.
Referenced by CppCheck::check(), CppCheckExecutor::check(), CppCheck::checkFile(), MainWindow::getCppcheckSettings(), CmdLineParser::isCppcheckPremium(), MainWindow::MainWindow(), and CppCheck::reportErr().
std::string Settings::templateFormat |
The output format in which the errors are printed in text mode, e.g.
"{severity} {file}:{line} {message} {id}"
Definition at line 373 of file settings.h.
Referenced by CmdLineParser::parseFromArgs().
std::string Settings::templateLocation |
The output format in which the error locations are printed in text mode, e.g.
"{file}:{line} {info}"
Definition at line 377 of file settings.h.
Referenced by Check::getErrorPath(), and CmdLineParser::parseFromArgs().
std::size_t Settings::templateMaxTime {} |
The maximum time in seconds for the template instantiation.
Definition at line 380 of file settings.h.
Referenced by CmdLineParser::parseFromArgs(), and Tokenizer::simplifyTemplates().
std::size_t Settings::typedefMaxTime {} |
The maximum time in seconds for the typedef simplification.
Definition at line 383 of file settings.h.
Referenced by CmdLineParser::parseFromArgs(), and Tokenizer::simplifyTypedefCpp().
std::string Settings::userDefines |
defines given by the user
Definition at line 386 of file settings.h.
Referenced by CppCheck::check(), CppCheckExecutor::check_internal(), CppCheck::checkClang(), CppCheck::checkFile(), createDUI(), MainWindow::doAnalyzeFiles(), MainWindow::doAnalyzeProject(), Preprocessor::getConfigs(), MainWindow::getCppcheckSettings(), Preprocessor::handleErrors(), ImportProject::importCppcheckGuiProject(), and CmdLineParser::parseFromArgs().
std::list<std::string> Settings::userIncludes |
forced includes given by the user
Definition at line 392 of file settings.h.
Referenced by createDUI(), and CmdLineParser::parseFromArgs().
std::set<std::string> Settings::userUndefs |
undefines given by the user
Definition at line 389 of file settings.h.
Referenced by CppCheck::check(), CppCheck::checkFile(), createDUI(), Preprocessor::getConfigs(), MainWindow::getCppcheckSettings(), ImportProject::importCppcheckGuiProject(), and CmdLineParser::parseFromArgs().
std::size_t Settings::valueFlowMaxIterations = 4 |
the maximum iterations of valueflow (–valueflow-max-iterations=T)
Definition at line 395 of file settings.h.
Referenced by CmdLineParser::parseFromArgs().
bool Settings::verbose {} |
Is –verbose given?
Definition at line 398 of file settings.h.
Referenced by CppCheck::checkClang(), CppCheck::checkFile(), MainWindow::getCppcheckSettings(), Check::getErrorPath(), Executor::hasToLog(), CmdLineParser::parseFromArgs(), Tokenizer::printDebugOutput(), and CppCheck::reportErr().
bool Settings::xml {} |
write XML results (–xml)
Definition at line 401 of file settings.h.
Referenced by CppCheckExecutor::check_internal(), MainWindow::getCppcheckSettings(), Check::getErrorPath(), CmdLineParser::parseFromArgs(), and Tokenizer::printDebugOutput().
int Settings::xml_version = 2 |
XML version (–xml-version=..)
Definition at line 404 of file settings.h.
Referenced by CmdLineParser::parseFromArgs().