threadsafety.py: reformat output

This commit is contained in:
Daniel Marjamäki 2017-08-15 21:44:21 +02:00
parent 256adfbcb5
commit 2ca46ceae9
1 changed files with 3 additions and 3 deletions

View File

@ -8,15 +8,15 @@ import cppcheckdata
import sys
def reportError(token, severity, msg):
def reportError(token, severity, msg, id):
sys.stderr.write(
'[' + token.file + ':' + str(token.linenr) + '] (' + severity + ') threadsafety.py: ' + msg + '\n')
'[' + token.file + ':' + str(token.linenr) + '] (' + severity + '): ' + msg + ' [' + id + ']\n')
def checkstatic(data):
for var in data.variables:
if var.isStatic and var.isLocal and var.isClass:
reportError(var.typeStartToken, 'warning', ('Local static object: ' + var.nameToken.str))
reportError(var.typeStartToken, 'warning', ('Local static object: ' + var.nameToken.str), 'threadsafety')
for arg in sys.argv[1:]:
print('Checking ' + arg + '...')