MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / __common_format

Method __common_format

client/task/basic/datahandler/formater.py:77–93  ·  view source on GitHub ↗

:param result: :param tool_name: :return:

(self, result, tool_name)

Source from the content-addressed store, hash-verified

75 return params
76
77 def __common_format(self, result, tool_name):
78 """
79
80 :param result:
81 :param tool_name:
82 :return:
83 """
84 issues = self.__insert_checker_name(result, tool_name)
85 fileissues = {}
86 for issue in issues:
87 path = issue.pop("path")
88 path = path.replace("\\", "/") # 转换为linux文件分隔符,方便后续对比操作
89 try:
90 fileissues[path]["issues"].append(issue)
91 except KeyError:
92 fileissues[path] = {"path": path, "issues": [issue]}
93 return list(fileissues.values())
94
95 def __insert_checker_name(self, result, checker_name):
96 """

Callers 2

_normal_formatMethod · 0.95
_ccn_formatMethod · 0.95

Calls 2

__insert_checker_nameMethod · 0.95
valuesMethod · 0.45

Tested by

no test coverage detected