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

Method _cmd_callback

client/tool/stylelint.py:122–132  ·  view source on GitHub ↗

命令执行log回调 :param line: log :return:

(self, line)

Source from the content-addressed store, hash-verified

120 return issues
121
122 def _cmd_callback(self, line):
123 """
124 命令执行log回调
125 :param line: log
126 :return:
127 """
128 self.print_log(line)
129 if line.find("JavaScript heap out of memory") != -1:
130 raise AnalyzeTaskError("Js内存溢出,请设置环境变量STYLELINT_MAX_OLD_SPACE_SIZE")
131 elif line.find("RangeError: Invalid string length") != -1:
132 raise AnalyzeTaskError("项目太大,扫描结果超过Js的buffer.constants.MAX_STRING_LENGTH最大字符串限制,请设置扫描路径过滤过滤无用文件")
133
134 def config(self, params):
135 """

Callers

nothing calls this directly

Calls 2

AnalyzeTaskErrorClass · 0.90
print_logMethod · 0.45

Tested by

no test coverage detected