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

Method analyze

client/tool/compass.py:27–39  ·  view source on GitHub ↗
(self, params)

Source from the content-addressed store, hash-verified

25 CodeLintModel.__init__(self, params)
26
27 def analyze(self, params):
28 source_dir = params["source_dir"]
29 self.relpos = len(source_dir) + 1
30 result_path = Tool(params).scan()
31 if not os.path.exists(result_path):
32 logger.info("没有生成结果文件")
33 raise AnalyzeTaskError("工具执行错误")
34 with open(result_path, "r") as result_reader:
35 issues = json.load(result_reader)
36 if not issues:
37 return []
38 issues = self._format_issue(issues)
39 return issues
40
41 def check_tool_usable(self, tool_params):
42 if settings.PLATFORMS[sys.platform] == "mac":

Callers

nothing calls this directly

Calls 5

_format_issueMethod · 0.95
AnalyzeTaskErrorClass · 0.90
scanMethod · 0.45
infoMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected