Skip to content

Commit 7ff58da

Browse files
authored
daca: filter checker results when there are syntaxError/unknownMacro/etc (#5214)
1 parent 260a214 commit 7ff58da

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tools/donate_cpu_lib.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,25 @@ def diff_results(ver1, results1, ver2, results2):
606606
ret += ver2 + ' ' + r2[i2] + '\n'
607607
i2 += 1
608608

609+
# if there are syntaxError/unknownMacro/etc then analysis stops.
610+
# diffing normal checker warnings will not make much sense
611+
bailout_ids = ('[syntaxError]', '[unknownMacro]')
612+
has_bailout_id = False
613+
for id in bailout_ids:
614+
if (id in results1) or (id in results1):
615+
has_bailout_id = True
616+
if has_bailout_id:
617+
def check_bailout(line):
618+
for id in bailout_ids:
619+
if line.endswith(id):
620+
return True
621+
return False
622+
out = ''
623+
for line in ret.split('\n'):
624+
if check_bailout(line):
625+
out += line + '\n'
626+
ret = out
627+
609628
return ret
610629

611630

0 commit comments

Comments
 (0)