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

Method parser

client/tool/util/loong/bcparser.py:41–60  ·  view source on GitHub ↗
(self, need_field=False)

Source from the content-addressed store, hash-verified

39 return tool_path
40
41 def parser(self, need_field=False):
42 tool_path = self.get_tool()
43 args = [
44 "path=%s" % self.project_root,
45 "useapi=true",
46 "out=%s" % self.bc_db,
47 ]
48 if need_field:
49 logger.info("use field mode parser.")
50 args.append("field=true")
51 apifinder_cmd = __lu__().format_cmd(tool_path, args)
52
53 try:
54 spc = SubProcController(apifinder_cmd, stdout_line_callback=subprocc_log, stderr_line_callback=subprocc_log)
55 if need_field:
56 spc.wait(60 * 60)
57 else:
58 spc.wait(20 * 60)
59 except ProcessExecuteTimeoutError:
60 logger.info("apifinder timeout.")
61
62
63if __name__ == "__main__":

Callers 1

analyzeMethod · 0.95

Calls 2

get_toolMethod · 0.95
infoMethod · 0.45

Tested by

no test coverage detected