remove redundant skip-mutating-contract logic

pull/2302/head
bohendo 10 months ago
parent 9ef4c2aeb9
commit fcbd327842
No known key found for this signature in database
  1. 19
      slither/tools/mutator/__main__.py

@ -276,23 +276,34 @@ def main() -> (None): # pylint: disable=too-many-statements,too-many-branches,t
logger.error("\nExecution interrupted by user (Ctrl + C). Cleaning up...") logger.error("\nExecution interrupted by user (Ctrl + C). Cleaning up...")
transfer_and_delete(files_dict) transfer_and_delete(files_dict)
if not target_contract == 'SLITHER_SKIP_MUTATIONS':
# transfer and delete the backup files # transfer and delete the backup files
transfer_and_delete(files_dict) transfer_and_delete(files_dict)
# output # output
print(yellow(f"Done mutating {filename}.")) print(yellow(f"Done mutating {filename}."))
if total_mutant_counts[0] > 0: if total_mutant_counts[0] > 0:
print(yellow(f"Revert mutants: {valid_mutant_counts[0]} valid of {total_mutant_counts[0]} ({100 * valid_mutant_counts[0]/total_mutant_counts[0]}%)")) print(
yellow(
f"Revert mutants: {valid_mutant_counts[0]} valid of {total_mutant_counts[0]} ({100 * valid_mutant_counts[0]/total_mutant_counts[0]}%)"
)
)
else: else:
print(yellow("Zero Revert mutants analyzed")) print(yellow("Zero Revert mutants analyzed"))
if total_mutant_counts[1] > 0: if total_mutant_counts[1] > 0:
print(yellow(f"Comment mutants: {valid_mutant_counts[1]} valid of {total_mutant_counts[1]} ({100 * valid_mutant_counts[1]/total_mutant_counts[1]}%)")) print(
yellow(
f"Comment mutants: {valid_mutant_counts[1]} valid of {total_mutant_counts[1]} ({100 * valid_mutant_counts[1]/total_mutant_counts[1]}%)"
)
)
else: else:
print(yellow("Zero Comment mutants analyzed")) print(yellow("Zero Comment mutants analyzed"))
if total_mutant_counts[2] > 0: if total_mutant_counts[2] > 0:
print(yellow(f"Tweak mutants: {valid_mutant_counts[2]} valid of {total_mutant_counts[2]} ({100 * valid_mutant_counts[2]/total_mutant_counts[2]}%)")) print(
yellow(
f"Tweak mutants: {valid_mutant_counts[2]} valid of {total_mutant_counts[2]} ({100 * valid_mutant_counts[2]/total_mutant_counts[2]}%)"
)
)
else: else:
print(yellow("Zero Tweak mutants analyzed")) print(yellow("Zero Tweak mutants analyzed"))

Loading…
Cancel
Save