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

Method isSuppressedExplicitly

lib/suppressions.cpp:490–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490bool SuppressionList::isSuppressedExplicitly(const SuppressionList::ErrorMessage &errmsg, bool global)
491{
492 std::lock_guard<std::mutex> lg(mSuppressionsSync);
493
494 for (Suppression &s : mSuppressions) {
495 if (!global && !s.isLocal())
496 continue;
497 if (s.errorId != errmsg.errorId) // Error id must match exactly
498 continue;
499 if (s.isMatch(errmsg))
500 return true;
501 }
502 return false;
503}
504
505bool SuppressionList::isSuppressed(const ::ErrorMessage &errmsg, const std::set<std::string>& macroNames)
506{

Callers 1

reportErrMethod · 0.80

Calls 1

isMatchMethod · 0.45

Tested by

no test coverage detected