Merge branch 'master' of https://github.com/danmar/cppcheck
This commit is contained in:
commit
64f0744242
|
@ -937,6 +937,7 @@ void CmdLineParser::printHelp()
|
|||
" be considered for evaluation.\n"
|
||||
" --config-excludes-file=<file>\n"
|
||||
" A file that contains a list of config-excludes\n"
|
||||
" --doc Print a list of all available checks.\n"
|
||||
" --dump Dump xml data for each translation unit. The dump\n"
|
||||
" files have the extension .dump and contain ast,\n"
|
||||
" tokenlist, symboldatabase, valueflow.\n"
|
||||
|
@ -981,7 +982,6 @@ void CmdLineParser::printHelp()
|
|||
" provided. Note that your operating system can modify\n"
|
||||
" this value, e.g. '256' can become '0'.\n"
|
||||
" --errorlist Print a list of all the error messages in XML format.\n"
|
||||
" --doc Print a list of all available checks.\n"
|
||||
" --exitcode-suppressions=<file>\n"
|
||||
" Used when certain messages should be displayed but\n"
|
||||
" should not cause a non-zero exitcode.\n"
|
||||
|
|
|
@ -985,6 +985,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti
|
|||
(void)ProjectVersionAttrib;
|
||||
|
||||
std::list<std::string> paths;
|
||||
std::list<std::string> suppressions;
|
||||
Settings temp;
|
||||
|
||||
for (const tinyxml2::XMLElement *node = rootnode->FirstChildElement(); node; node = node->NextSiblingElement()) {
|
||||
|
@ -1009,11 +1010,9 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti
|
|||
guiProject.excludedPaths = readXmlStringList(node, IgnorePathName, IgnorePathNameAttrib);
|
||||
else if (strcmp(node->Name(), LibrariesElementName) == 0)
|
||||
guiProject.libraries = readXmlStringList(node, LibraryElementName, nullptr);
|
||||
else if (strcmp(node->Name(), SuppressionsElementName) == 0) {
|
||||
for (const std::string &s : readXmlStringList(node, SuppressionElementName, nullptr)) {
|
||||
temp.nomsg.addSuppressionLine(s);
|
||||
}
|
||||
} else if (strcmp(node->Name(), PlatformElementName) == 0)
|
||||
else if (strcmp(node->Name(), SuppressionsElementName) == 0)
|
||||
suppressions = readXmlStringList(node, SuppressionElementName, nullptr);
|
||||
else if (strcmp(node->Name(), PlatformElementName) == 0)
|
||||
guiProject.platform = node->GetText();
|
||||
else if (strcmp(node->Name(), AnalyzeAllVsConfigsElementName) == 0)
|
||||
; // FIXME: Write some warning
|
||||
|
@ -1033,5 +1032,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti
|
|||
settings->userUndefs = temp.userUndefs;
|
||||
for (const std::string &path : paths)
|
||||
guiProject.pathNames.push_back(path);
|
||||
for (const std::string &supp : suppressions)
|
||||
settings->nomsg.addSuppressionLine(supp);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue