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

Method isPremiumEnabled

lib/settings.cpp:751–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749};
750
751bool Settings::isPremiumEnabled(const char id[]) const
752{
753 if (premiumArgs.empty())
754 return false;
755 if (premiumArgs.find("autosar") != std::string::npos && autosarCheckers.count(id))
756 return true;
757 if (premiumArgs.find("cert-c-") != std::string::npos && certCCheckers.count(id))
758 return true;
759 if (premiumArgs.find("cert-c++") != std::string::npos && certCppCheckers.count(id))
760 return true;
761 if (premiumArgs.find("misra-c-") != std::string::npos && (misrac2012Checkers.count(id) || misrac2023Checkers.count(id) || misrac2025Checkers.count(id)))
762 return true;
763 if (premiumArgs.find("misra-c++-2008") != std::string::npos && misracpp2008Checkers.count(id))
764 return true;
765 if (premiumArgs.find("misra-c++-2023") != std::string::npos && misracpp2023Checkers.count(id))
766 return true;
767 return false;
768}
769
770Settings::ExecutorType Settings::defaultExecutor()
771{

Callers 15

nullPointerErrorMethod · 0.80
pointerArithmeticMethod · 0.80
argumentSizeMethod · 0.80
unusedVariableErrorMethod · 0.80
unreadVariableErrorMethod · 0.80
checkLongCastMethod · 0.80
invalidScanfMethod · 0.80

Calls 2

emptyMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected