MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / summaryReportFromDict

Function summaryReportFromDict

tools/donate-cpu-server.py:563–588  ·  view source on GitHub ↗
(out: dict, prefix: str, today: str)

Source from the content-addressed store, hash-verified

561
562
563def summaryReportFromDict(out: dict, prefix: str, today: str) -> str:
564 html = '<pre>\n'
565 html += '<b>MessageID Count</b>\n'
566 sumTotal = 0
567 for messageId in sorted(out.keys()):
568 line = messageId + ' '
569 counts = out[messageId]
570 sumTotal += counts
571 if counts > 0:
572 c = str(counts)
573 while len(line) < 48 - len(c):
574 line += ' '
575 line += c + ' '
576 line = '<a href="' + prefix + today + '-' + messageId + '">' + messageId + '</a>' + line[line.find(' '):]
577 html += line + '\n'
578
579 # Sum
580 html += '================================================\n'
581 line = ''
582 while len(line) < 48 - len(str(sumTotal)):
583 line += ' '
584 line += str(sumTotal) + ' '
585 html += line + '\n'
586 html += '</pre>\n'
587
588 return html
589
590
591def summaryReport(resultsPath: str, name: str, prefix: str, marker: str) -> str:

Callers 1

summaryReportFunction · 0.85

Calls 2

strFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected