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

Method getCheckingSuppressions

gui/projectfile.cpp:767–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765}
766
767QList<SuppressionList::Suppression> ProjectFile::getCheckingSuppressions() const
768{
769 const QRegularExpression re1("^[a-zA-Z0-9_\\-]+/.*");
770 const QRegularExpression re2("^[^/]+$");
771 QList<SuppressionList::Suppression> result;
772 for (SuppressionList::Suppression suppression : mSuppressions) {
773 if (re1.match(suppression.fileName.c_str()).hasMatch() || re2.match(suppression.fileName.c_str()).hasMatch()) {
774 if (suppression.fileName[0] != '*')
775 suppression.fileName = QFileInfo(mFilename).absolutePath().toStdString() + "/" + suppression.fileName;
776 }
777 result << suppression;
778 }
779 return result;
780}
781
782void ProjectFile::setSuppressions(const QList<SuppressionList::Suppression> &suppressions)
783{

Calls 1

matchMethod · 0.45