daca: filter checker results when there are syntaxError/unknownMacro/etc (#5214)
This commit is contained in:
parent
260a214ef1
commit
7ff58dacff
|
@ -606,6 +606,25 @@ def diff_results(ver1, results1, ver2, results2):
|
|||
ret += ver2 + ' ' + r2[i2] + '\n'
|
||||
i2 += 1
|
||||
|
||||
# if there are syntaxError/unknownMacro/etc then analysis stops.
|
||||
# diffing normal checker warnings will not make much sense
|
||||
bailout_ids = ('[syntaxError]', '[unknownMacro]')
|
||||
has_bailout_id = False
|
||||
for id in bailout_ids:
|
||||
if (id in results1) or (id in results1):
|
||||
has_bailout_id = True
|
||||
if has_bailout_id:
|
||||
def check_bailout(line):
|
||||
for id in bailout_ids:
|
||||
if line.endswith(id):
|
||||
return True
|
||||
return False
|
||||
out = ''
|
||||
for line in ret.split('\n'):
|
||||
if check_bailout(line):
|
||||
out += line + '\n'
|
||||
ret = out
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue