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

Function messageIdTodayReport

tools/donate-cpu-server.py:707–736  ·  view source on GitHub ↗
(resultPath: str, messageId: str, marker: str)

Source from the content-addressed store, hash-verified

705
706
707def messageIdTodayReport(resultPath: str, messageId: str, marker: str) -> str:
708 text = messageId + '\n'
709 e = '[' + messageId + ']\n'
710 today = strDateTime()[:10]
711 for filename in sorted(glob.glob(resultPath + '/*')):
712 if not os.path.isfile(filename) or filename.endswith('.diff'):
713 continue
714 url = None
715 inResults = False
716 firstLine = True
717 for line in open(filename, 'rt'):
718 if firstLine:
719 firstLine = False
720 if not line.startswith(today):
721 break
722 if line.startswith('ftp://'):
723 url = line
724 continue
725 if not inResults:
726 if line.startswith(marker):
727 inResults = True
728 continue
729 if line.startswith('diff:'):
730 break
731 if line.endswith(e):
732 if url:
733 text += url
734 url = None
735 text += line
736 return text
737
738
739def headMessageIdTodayReport(resultPath: str, messageId: str) -> str:

Callers 2

headMessageIdTodayReportFunction · 0.85
infoMessageIdTodayReportFunction · 0.85

Calls 1

strDateTimeFunction · 0.85

Tested by

no test coverage detected