daca2: output warning id to make it possible to write more statistics

This commit is contained in:
Daniel Marjamäki 2016-12-06 09:33:41 +01:00
parent 0b3fe1807b
commit 5426cfb15e
1 changed files with 6 additions and 4 deletions

View File

@ -156,13 +156,15 @@ def scanarchive(filepath, jobs, cpulimit):
print(strfCurrTime('[%H:%M] cppcheck ') + filename) print(strfCurrTime('[%H:%M] cppcheck ') + filename)
cmd = '../cppcheck-O2 -D__GCC__ --enable=style --error-exitcode=0 --exception-handling=stderr ' + jobs + ' .'
if cpulimit: if cpulimit:
cmd = 'cpulimit --limit=' + cpulimit + ' ' + cmd cmd = 'cpulimit --limit=' + cpulimit
else: else:
cmd = 'nice --adjustment=1000 ' + cmd cmd = 'nice --adjustment=1000'
cmd = cmd + ' ../cppcheck-O2 -D__GCC__ --enable=style --error-exitcode=0 --exception-handling=stderr ' + jobs + ' .'
cmds = cmd.split()
cmds.append('--template={callstack}: ({severity}) {message} [{id}]')
p = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE, stderr=subprocess.PIPE) p = subprocess.Popen(cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
comm = p.communicate() comm = p.communicate()
results = open('results.txt', 'at') results = open('results.txt', 'at')