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