@@ -1225,6 +1225,17 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti
12251225 }
12261226 } else if (strcmp (node->Name (), CppcheckXml::TagWarningsElementName) == 0 )
12271227 ; // TODO
1228+ // Cppcheck Premium features
1229+ else if (strcmp (node->Name (), CppcheckXml::BughuntingElementName) == 0 )
1230+ temp.premiumArgs += " --bughunting" ;
1231+ else if (strcmp (node->Name (), CppcheckXml::CertIntPrecisionElementName) == 0 )
1232+ temp.premiumArgs += std::string (" --cert-c-int-precision=" ) + (node->GetText () ? node->GetText () : " 0" );
1233+ else if (strcmp (node->Name (), CppcheckXml::CodingStandardsElementName) == 0 ) {
1234+ for (const tinyxml2::XMLElement *child = node->FirstChildElement (); child; child = child->NextSiblingElement ()) {
1235+ if (strcmp (child->Name (), CppcheckXml::CodingStandardElementName) == 0 && child->GetText ())
1236+ temp.premiumArgs += std::string (" --" ) + child->GetText ();
1237+ }
1238+ }
12281239 else
12291240 return false ;
12301241 }
@@ -1238,6 +1249,11 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti
12381249 settings->clang = temp.clang ;
12391250 settings->clangTidy = temp.clangTidy ;
12401251
1252+ if (!settings->premiumArgs .empty ())
1253+ settings->premiumArgs += temp.premiumArgs ;
1254+ else if (!temp.premiumArgs .empty ())
1255+ settings->premiumArgs = temp.premiumArgs .substr (1 );
1256+
12411257 for (const std::string &p : paths)
12421258 guiProject.pathNames .push_back (p);
12431259 for (const Suppressions::Suppression &supp : suppressions)
0 commit comments