MCPcopy Create free account
hub / github.com/Tencent/CodeAnalysis / compile

Method compile

client/tool/clangwarning.py:93–112  ·  view source on GitHub ↗

执行 clangwarning 扫描任务 :param request: 任务请求 :return: return a :py:class:`IssueResponse`

(self, params)

Source from the content-addressed store, hash-verified

91 return build_log_path
92
93 def compile(self, params):
94 """执行 clangwarning 扫描任务
95 :param request: 任务请求
96 :return: return a :py:class:`IssueResponse`
97 """
98 # 根据项目环境变量选择合适的xcode版本
99 XcodeSwitch.set_xcodebuild_version()
100
101 rules = params['rules']
102 source_dir = params['source_dir']
103
104 # 1.clang编译项目
105 build_log_path = self.__run_clang(params, source_dir, rules)
106 LogPrinter.debug("build_log_path: %s" % (build_log_path))
107
108 # 2.解析构建日志
109 LogPrinter.info('analyze build log ...')
110 issues = BuildLogAnalyzer().analyze_log_file(source_dir, rules, build_log_path)
111
112 return issues
113
114 def check_tool_usable(self, tool_params):
115 spc = SubProcController(command=["xcodebuild", "-version"])

Callers

nothing calls this directly

Calls 4

__run_clangMethod · 0.95
debugMethod · 0.80
infoMethod · 0.45

Tested by

no test coverage detected