:return: task是否成功
(self, params)
| 28 | self.task_type = CompileTask |
| 29 | |
| 30 | def runner(self, params): |
| 31 | """ |
| 32 | :return: task是否成功 |
| 33 | """ |
| 34 | Reporter(params).update_task_progress(InfoType.CompileTask) |
| 35 | |
| 36 | # 判断与对比分支无差异时,是否需要跳过。如果是,直接返回空 |
| 37 | if self.tool.set_no_branch_diff_skip(params): |
| 38 | logger.info("与对比分支无差异,满足skip条件,跳过compile步骤,直接返回空结果(说明: 只有codelint类工具跳过,codemetric不跳过).") |
| 39 | params["tool_skip"] = True |
| 40 | return [] |
| 41 | |
| 42 | # params如果没有tool_skip字段时,才需要判断;如果有上个阶段,则已经判断过,无需重复判断 |
| 43 | if "tool_skip" not in params: |
| 44 | params["tool_skip"] = self.tool.set_tool_skip_condition(params) |
| 45 | if params["tool_skip"]: |
| 46 | logger.info("满足skip条件,跳过compile步骤,直接返回空结果.") |
| 47 | return [] |
| 48 | |
| 49 | return self.tool.compile(params) |
| 50 | |
| 51 | |
| 52 | task = CompileTask |
nothing calls this directly
no test coverage detected