Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ class CppCheck::CppCheckLogger : public ErrorLogger
// TODO: only convert if necessary
const auto errorMessage = SuppressionList::ErrorMessage::fromErrorMessage(msg, macroNames);

bool suppressed = false;

if (mSuppressions.nomsg.isSuppressed(errorMessage, mUseGlobalSuppressions)) {
// Safety: Report critical errors to ErrorLogger
if (mSettings.safety && ErrorLogger::isCriticalErrorId(msg.id)) {
Expand All @@ -193,7 +195,7 @@ class CppCheck::CppCheckLogger : public ErrorLogger
mErrorLogger.reportErr(msg);
}
}
return;
suppressed = true;
}

// TODO: there should be no need for the verbose and default messages here
Expand All @@ -210,6 +212,9 @@ class CppCheck::CppCheckLogger : public ErrorLogger
if (mAnalyzerInformation)
mAnalyzerInformation->reportErr(msg);

if (suppressed)
return;

if (!mSuppressions.nofail.isSuppressed(errorMessage) && !mSuppressions.nomsg.isSuppressed(errorMessage)) {
mExitCode = 1;
}
Expand Down