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

Method format_result

client/tool/clang.py:115–131  ·  view source on GitHub ↗

格式化工具执行结果

(self, rules, source_dir, plist_paths)

Source from the content-addressed store, hash-verified

113 return issues
114
115 def format_result(self, rules, source_dir, plist_paths):
116 """格式化工具执行结果
117 """
118 # 支持通过环境变量,配置是否启用全量规则
119 use_all_rules = True if os.environ.get('CLANG_ALL_RULES', "False") == "True" else False
120 if use_all_rules:
121 LogPrinter.info("全量规则分析,不需要过滤规则.")
122 issues = []
123 for plist_path in plist_paths:
124 try:
125 if os.path.getsize(plist_path) < 512:
126 continue
127 except (IOError, OSError):
128 continue
129 result = PlistParser().parse_plist(plist_path, source_dir, rules, use_all_rules)
130 issues.extend(result)
131 return issues
132
133 def check_tool_usable(self, tool_params):
134 spc = SubProcController(command=["xcodebuild", "-version"])

Callers 1

analyzeMethod · 0.95

Calls 2

getMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected