Cppcheck results for ' + project + '\n')
fout.write('
Cppcheck results for ' + project + '
\n')
fout.write('
\n')
fout.write('
Filename
Line
Message
Classification
\n')
out = {}
out['untriaged'] = ''
out['fp'] = ''
out['tp'] = ''
for result in results:
result = result.strip()
res = re.match('\\[('+project+'.+):([0-9]+)\\]:\s+[(][a-z]+[)] (.+)', result)
if res == None:
continue
filename = res.group(1)
linenr = res.group(2)
message = res.group(3)
css = 'untriaged'
classification = 'Untriaged'
if result in truepositives:
css = 'tp'
classification = 'Bug'
elif result in falsepositives:
css = 'fp'
classification = 'Not bug'
html = '
'
html += '
'+filename+'
'
html += '
'+linenr+'
'
html += '
'+message+'
'
html += '
'+classification+'
'
html += '
\n'
out[css] += html
fout.write(out['tp'])
fout.write(out['fp'])
fout.write(out['untriaged'])
fout.write('