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

Method getUnmatchedGlobalSuppressions

lib/suppressions.cpp:584–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584std::list<SuppressionList::Suppression> SuppressionList::getUnmatchedGlobalSuppressions() const
585{
586 std::lock_guard<std::mutex> lg(mSuppressionsSync);
587
588 std::list<Suppression> result;
589 for (const Suppression &s : mSuppressions) {
590 if (s.isInline)
591 continue;
592 if (s.matched)
593 continue;
594 if (!s.checked && s.isWildcard())
595 continue;
596 if (s.hash > 0)
597 continue;
598 if (s.errorId == ID_CHECKERSREPORT)
599 continue;
600 if (s.isLocal())
601 continue;
602 result.push_back(s);
603 }
604 return result;
605}
606
607std::list<SuppressionList::Suppression> SuppressionList::getUnmatchedInlineSuppressions() const
608{

Calls 1

push_backMethod · 0.45

Tested by 4

suppressionWildcardMethod · 0.64