MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / format_parse_error

Method format_parse_error

client/tool/checkstyle.py:358–373  ·  view source on GitHub ↗

用于解析checkstyle语法解析报错,并提issues

(self, line)

Source from the content-addressed store, hash-verified

356 return True
357
358 def format_parse_error(self, line):
359 """
360 用于解析checkstyle语法解析报错,并提issues
361
362 """
363 pattern = "line (.*?):"
364 regex = re.compile(pattern)
365 line = re.findall(regex, line)
366 if line:
367 try:
368 int(line[0])
369 except:
370 return 1
371 return int(line[0])
372 else:
373 return 1
374
375
376class ThreadRunner(object):

Callers 1

error_handleMethod · 0.95

Calls 1

compileMethod · 0.45

Tested by

no test coverage detected