(self, params)
| 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": |
nothing calls this directly
no test coverage detected