From c30f21ed2a5a3f51aac293eee7ae3238058221c5 Mon Sep 17 00:00:00 2001 From: Konrad Grochowski Date: Wed, 13 Jun 2018 22:32:27 +0200 Subject: [PATCH] cppcheckdata.py - support for missing file name in suppression (#1286) --- addons/cppcheckdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/cppcheckdata.py b/addons/cppcheckdata.py index 4e23a9b68..251431bb6 100755 --- a/addons/cppcheckdata.py +++ b/addons/cppcheckdata.py @@ -484,7 +484,7 @@ class Suppression: self.symbolName = element.get('symbolName') def isMatch(self, file, line, message, errorId): - if (fnmatch(file, self.fileName) + if ((self.fileName is None or fnmatch(file, self.fileName)) and (self.lineNumber is None or line == self.lineNumber) and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*')) and fnmatch(errorId, self.errorId)):