@@ -360,12 +360,16 @@ void CheckThread::parseAddonErrors(QString err, const QString &tool)
360360 const int column = obj[" col" ].toInt ();
361361 const std::string severity = obj[" severity" ].toString ().toStdString ();
362362 const std::string message = obj[" message" ].toString ().toStdString ();
363- const std::string id = obj[" errorId" ].toString ().toStdString ();
363+ const std::string id = ( obj[" addon " ]. toString () + " - " + obj[ " errorId" ].toString () ).toStdString ();
364364
365365 std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
366366 callstack.push_back (ErrorLogger::ErrorMessage::FileLocation (filename, lineNumber));
367367 callstack.back ().col = column;
368368 ErrorLogger::ErrorMessage errmsg (callstack, filename, Severity::fromString (severity), message, id, false );
369+
370+ if (isSuppressed (errmsg.toSuppressionsErrorMessage ()))
371+ continue ;
372+
369373 mResult .reportErr (errmsg);
370374 }
371375}
@@ -452,15 +456,9 @@ void CheckThread::parseClangErrors(const QString &tool, const QString &file0, QS
452456 errorMessage.errorId = e.errorId .toStdString ();
453457 errorMessage.symbolNames = e.symbolNames .toStdString ();
454458
455- bool isSuppressed = false ;
456- foreach (const Suppressions::Suppression &suppression, mSuppressions ) {
457- if (suppression.isSuppressed (errorMessage)) {
458- isSuppressed = true ;
459- break ;
460- }
461- }
462- if (isSuppressed)
459+ if (isSuppressed (errorMessage))
463460 continue ;
461+
464462 std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
465463 foreach (const QErrorPathItem &path, e.errorPath ) {
466464 callstack.push_back (ErrorLogger::ErrorMessage::FileLocation (path.file .toStdString (), path.info .toStdString (), path.line ));
@@ -473,6 +471,15 @@ void CheckThread::parseClangErrors(const QString &tool, const QString &file0, QS
473471 }
474472}
475473
474+ bool CheckThread::isSuppressed (const Suppressions::ErrorMessage &errorMessage) const
475+ {
476+ foreach (const Suppressions::Suppression &suppression, mSuppressions ) {
477+ if (suppression.isSuppressed (errorMessage))
478+ return true ;
479+ }
480+ return false ;
481+ }
482+
476483QString CheckThread::clangCmd ()
477484{
478485 QString path = QSettings ().value (SETTINGS_CLANG_PATH,QString ()).toString ();
0 commit comments