43 #include <unordered_set> 
   67         return (
mFlags & (1U << (uint32_t)flag)) != 0;
 
   70         mFlags |= (1U << (uint32_t)flag);
 
   76         mFlags &= ~(1U << (uint32_t)flag);
 
  106     static std::pair<std::string, std::string> getNameAndVersion(
const std::string& productName);
 
  124     bool checkAllConfigurations = 
true;
 
  127     bool checkConfiguration{};
 
  132     bool checkHeaders = 
true;
 
  147     bool checkUnusedTemplates = 
true;
 
  153     std::string clangExecutable = 
"clang";
 
  159     bool clearIncludeCache{};
 
  177     bool debugSimplified{};
 
  180     bool debugtemplate{};
 
  183     bool debugwarnings{};
 
  192 #if defined(USE_WINDOWS_SEH) || defined(USE_UNIX_SIGNAL_HANDLING) 
  194     bool exceptionHandling{};
 
  199 #ifdef HAS_THREADING_MODEL_THREAD 
  202 #ifdef HAS_THREADING_MODEL_FORK 
  227     bool inlineSuppressions{};
 
  231     unsigned int jobs = 1;
 
  250     int maxTemplateRecursion = 100;
 
  258     int performanceValueFlowMaxTime = -1;
 
  261     int performanceValueFlowMaxIfCount = -1;
 
  264     int performanceValueFlowMaxSubFunctionArgs = 256;
 
  276     bool isPremiumEnabled(
const char id[]) 
const;
 
  279     bool preprocessOnly{};
 
  285     bool relativePaths{};
 
  288     int reportProgress{-1};
 
  293         std::string tokenlist = 
"normal"; 
 
  295         std::string 
id = 
"rule"; 
 
  303     std::list<Rule> rules;
 
  318         static const char XmlRootName[];
 
  319         static const char XmlClasses[];
 
  320         static const char XmlExternalFunctions[];
 
  321         static const char XmlInternalFunctions[];
 
  322         static const char XmlExternalVariables[];
 
  325             classes = externalFunctions = internalFunctions = externalVariables = 
false;
 
  341         bool externalFunctions{};
 
  347         bool internalFunctions{};
 
  353         bool externalVariables{};
 
  380     std::size_t templateMaxTime{};
 
  383     std::size_t typedefMaxTime{};
 
  395     std::size_t valueFlowMaxIterations = 4;
 
  411         return std::any_of(configExcludePaths.begin(), configExcludePaths.end(), [&file](
const std::string& path) {
 
  412             return file.length() >= path.length() && file.compare(0, path.length(), path) == 0;
 
  422     std::string addEnabled(
const std::string &str);
 
  430     std::string removeEnabled(
const std::string &str);
 
  436     bool isEnabled(
const ValueFlow::Value *value, 
bool inconclusiveCheck=
false) 
const;
 
  439     bool hasLib(
const std::string &lib)
 const {
 
  440         return std::find(libraries.cbegin(), libraries.cend(), lib) != libraries.cend();
 
  455     void loadSummaries();
 
  469     using ExecuteCmdFn = std::function<int (std::string,std::vector<std::string>,std::string,std::string&)>;
 
  470     void setMisraRuleTexts(
const ExecuteCmdFn& executeCommand);
 
  471     void setMisraRuleTexts(
const std::string& data);
 
  472     std::string getMisraRuleText(
const std::string& 
id, 
const std::string& text) 
const;
 
  478     std::string applyEnabled(
const std::string &str, 
bool enable);
 
Library definitions handling.
 
This is just a container for general settings so that we don't need to pass individual values to func...
 
std::set< std::string > userUndefs
undefines given by the user
 
static void terminate(bool t=true)
Request termination of checking.
 
static std::atomic< bool > mTerminated
terminate checking
 
bool hasLib(const std::string &lib) const
Is library specified?
 
std::set< std::string > configExcludePaths
include paths excluded from checking the configuration
 
std::map< std::string, std::string > mMisraRuleTexts
 
std::vector< std::string > basePaths
Paths used as base for conversion to relative paths.
 
bool configurationExcluded(const std::string &file) const
return true if a included file is to be excluded in Preprocessor::getConfigs
 
Suppressions supprs
suppressions
 
std::string plistOutput
plist output (–plist-output=<dir>)
 
std::string templateFormat
The output format in which the errors are printed in text mode, e.g.
 
SimpleEnableGroup< Checks > checks
 
std::function< int(std::string, std::vector< std::string >, std::string, std::string &)> ExecuteCmdFn
 
static bool terminated()
termination requested?
 
std::unordered_set< std::string > addons
addons, either filename of python/json file or json data
 
std::string buildDir
–cppcheck-build-dir.
 
std::string templateLocation
The output format in which the error locations are printed in text mode, e.g.
 
std::string cppcheckCfgProductName
cppcheck.cfg: Custom product name
 
std::string userDefines
defines given by the user
 
std::vector< AddonInfo > addonInfos
the loaded addons infos
 
std::string premiumArgs
Extra arguments for Cppcheck Premium addon.
 
std::set< std::string > summaryReturn
 
std::string cppcheckCfgAbout
cppcheck.cfg: About text
 
std::string outputFile
write results (–output-file=<file>)
 
bool useSingleJob() const
 
std::set< std::string > checkUnknownFunctionReturn
check unknown function return values
 
std::list< std::string > libraries
–library=
 
std::list< std::string > includePaths
List of include paths, e.g.
 
SimpleEnableGroup< Certainty > certainty
 
std::list< std::string > userIncludes
forced includes given by the user
 
SimpleEnableGroup< Severity > severity
 
std::string checkersReportFilename
–checkers-report=<filename> : Generate report of executed checkers
 
std::vector< std::string > fileFilters
List of –file-filter for analyzing special files.
 
std::string addonPython
Path to the python interpreter to be used to run addons.
 
Standards standards
Struct contains standards settings.
 
bool isEnabled(T flag) const
 
void setEnabled(T flag, bool enabled)
 
uint32_t intValue() const
 
void enable(SimpleEnableGroup< T > group)
 
void disable(SimpleEnableGroup< T > group)
 
Severity
enum class for severity.
 
Do not only check how interface is used.
 
This is just a container for standards settings.