Addons: Reuse cppcheckdata.simpleMatch
This commit is contained in:
parent
c95b0d2a51
commit
7e8839a991
|
@ -25,11 +25,8 @@ def reportError(token, severity, msg, id):
|
||||||
cppcheckdata.reportError(token, severity, msg, 'cert', id)
|
cppcheckdata.reportError(token, severity, msg, 'cert', id)
|
||||||
|
|
||||||
def simpleMatch(token, pattern):
|
def simpleMatch(token, pattern):
|
||||||
for p in pattern.split(' '):
|
return cppcheckdata.simpleMatch(token, pattern)
|
||||||
if not token or token.str != p:
|
|
||||||
return False
|
|
||||||
token = token.next
|
|
||||||
return True
|
|
||||||
|
|
||||||
def isUnpackedStruct(token):
|
def isUnpackedStruct(token):
|
||||||
if token.valueType is None:
|
if token.valueType is None:
|
||||||
|
|
|
@ -24,11 +24,7 @@ def reportError(token, severity, msg, id):
|
||||||
cppcheckdata.reportError(token, severity, msg, 'misc', id)
|
cppcheckdata.reportError(token, severity, msg, 'misc', id)
|
||||||
|
|
||||||
def simpleMatch(token, pattern):
|
def simpleMatch(token, pattern):
|
||||||
for p in pattern.split(' '):
|
return cppcheckdata.simpleMatch(token, pattern)
|
||||||
if not token or token.str != p:
|
|
||||||
return False
|
|
||||||
token = token.next
|
|
||||||
return True
|
|
||||||
|
|
||||||
# Get function arguments
|
# Get function arguments
|
||||||
def getArgumentsRecursive(tok, arguments):
|
def getArgumentsRecursive(tok, arguments):
|
||||||
|
|
|
@ -59,11 +59,7 @@ def isUnsignedType(ty):
|
||||||
|
|
||||||
|
|
||||||
def simpleMatch(token, pattern):
|
def simpleMatch(token, pattern):
|
||||||
for p in pattern.split(' '):
|
return cppcheckdata.simpleMatch(token, pattern)
|
||||||
if not token or token.str != p:
|
|
||||||
return False
|
|
||||||
token = token.next
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
def rawlink(rawtoken):
|
def rawlink(rawtoken):
|
||||||
|
|
Loading…
Reference in New Issue