Skip to content

Commit

Permalink
Skip result collection when unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
zacikpa committed Jul 20, 2023
1 parent 76d85b6 commit 115e84f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions diffkemp/semdiff/function_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ def functions_diff(mod_first, mod_second,
"warning: unknown diff kind: {}\n".format(
fun_result.first.diff_kind))
fun_result.diff = "unknown\n"
# Do not save the result if there is neither syntactic nor
# semantic difference.
if (fun_result.kind != Result.Kind.NOT_EQUAL and
fun_result.diff == ""):
continue
result.add_inner(fun_result)
except ValueError:
result.kind = Result.Kind.ERROR
Expand Down

0 comments on commit 115e84f

Please sign in to comment.