Skip to content

Commit df0d6e2

Browse files
alucardeddanmar
authored andcommitted
Support importing projects with project-name (#5456)
1 parent f2f1fb0 commit df0d6e2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/importproject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,8 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti
12551255
temp.premiumArgs += std::string(" --") + child->GetText();
12561256
}
12571257
}
1258+
else if (strcmp(node->Name(), CppcheckXml::ProjectNameElementName) == 0)
1259+
; // no-op
12581260
else {
12591261
printError("Unknown element '" + std::string(node->Name()) + "' in Cppcheck project file");
12601262
return false;

test/testimportproject.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ class TestImportProject : public TestFixture {
340340
" <exclude>\n"
341341
" <path name=\"gui/temp/\"/>\n"
342342
" </exclude>\n"
343+
" <project-name>test test</project-name>\n"
343344
"</project>\n";
344345
std::istringstream istr(xml);
345346
Settings s;

0 commit comments

Comments
 (0)