MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / loadCppcheckCfg

Method loadCppcheckCfg

cli/cmdlineparser.cpp:2226–2242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2224}
2225
2226bool CmdLineParser::loadCppcheckCfg()
2227{
2228 if (!mSettings.settingsFiles.empty())
2229 {
2230 // should never happen - programming error
2231 mLogger.printError("cppcheck.cfg has already been loaded from " + mSettings.settingsFiles[0]);
2232 return false;
2233 }
2234 const std::string cfgErr = Settings::loadCppcheckCfg(mSettings, mSuppressions, mSettings.debuglookup || mSettings.debuglookupConfig);
2235 if (!cfgErr.empty()) {
2236 // TODO: log full path
2237 mLogger.printError("could not load cppcheck.cfg - " + cfgErr);
2238 return false;
2239 }
2240 mSettings.premium = startsWith(mSettings.cppcheckCfgProductName, "Cppcheck Premium");
2241 return true;
2242}
2243
2244std::list<FileWithDetails> CmdLineParser::filterFiles(const std::vector<std::string>& fileFilters,
2245 const std::list<FileWithDetails>& filesResolved) {

Callers

nothing calls this directly

Calls 3

startsWithFunction · 0.50
emptyMethod · 0.45
printErrorMethod · 0.45

Tested by

no test coverage detected