reset mutant counts after each analyzed files

pull/2302/head
bohendo 10 months ago
parent f15fbf1f39
commit a3e6c4b435
No known key found for this signature in database
  1. 11
      slither/tools/mutator/__main__.py

@ -243,6 +243,7 @@ def main() -> (None): # pylint: disable=too-many-statements,too-many-branches,t
dont_mutate_lines = lines_list
if not quick_flag:
dont_mutate_lines = []
except Exception as e: # pylint: disable=broad-except
logger.error(e)
@ -271,4 +272,14 @@ def main() -> (None): # pylint: disable=too-many-statements,too-many-branches,t
else:
print(yellow("Zero Tweak mutants analyzed"))
# Reset mutant counts before moving on to the next file
total_mutant_counts[0] = 0
total_mutant_counts[1] = 0
total_mutant_counts[2] = 0
valid_mutant_counts[0] = 0
valid_mutant_counts[1] = 0
valid_mutant_counts[2] = 0
print(magenta(f"Finished Mutation Campaign in '{args.codebase}' \n"))
# endregion

Loading…
Cancel
Save