Skip to content

Commit

Permalink
daca: filter checker results when there are syntaxError/unknownMacro/etc
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Jul 1, 2023
1 parent db49687 commit 2e1f0f2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/donate_cpu_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 2e1f0f2

Please sign in to comment.