cppcheckdata.py - support for missing file name in suppression (#1286)

This commit is contained in:
Konrad Grochowski 2018-06-13 22:32:27 +02:00 committed by Daniel Marjamäki
parent 5ad1b2bdd1
commit c30f21ed2a
1 changed files with 1 additions and 1 deletions

View File

@ -484,7 +484,7 @@ class Suppression:
self.symbolName = element.get('symbolName') self.symbolName = element.get('symbolName')
def isMatch(self, file, line, message, errorId): 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.lineNumber is None or line == self.lineNumber)
and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*')) and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*'))
and fnmatch(errorId, self.errorId)): and fnmatch(errorId, self.errorId)):