diff --git a/slither/tools/mutator/__main__.py b/slither/tools/mutator/__main__.py index 10fb8eb84..d97806e28 100644 --- a/slither/tools/mutator/__main__.py +++ b/slither/tools/mutator/__main__.py @@ -77,15 +77,6 @@ def parse_args() -> argparse.Namespace: default=False, ) - # to print just all the mutants - parser.add_argument( - "-vv", - "--very-verbose", - help="log mutants that are caught, uncaught, and fail to compile. And more!", - action="store_true", - default=False, - ) - # select list of mutators to run parser.add_argument( "--mutators-to-run", @@ -159,15 +150,11 @@ def main() -> None: # pylint: disable=too-many-statements,too-many-branches,too timeout: Optional[int] = args.timeout solc_remappings: Optional[str] = args.solc_remaps verbose: Optional[bool] = args.verbose - very_verbose: Optional[bool] = args.very_verbose mutators_to_run: Optional[List[str]] = args.mutators_to_run comprehensive_flag: Optional[bool] = args.comprehensive logger.info(blue(f"Starting mutation campaign in {args.codebase}")) - if very_verbose: # very_verbose should always be a superset of verbose logs - verbose = True - if paths_to_ignore: paths_to_ignore_list = paths_to_ignore.strip("][").split(",") else: @@ -293,7 +280,6 @@ def main() -> None: # pylint: disable=too-many-statements,too-many-branches,too target_contract, solc_remappings, verbose, - very_verbose, output_folder, dont_mutate_lines, ) @@ -378,8 +364,6 @@ def main() -> None: # pylint: disable=too-many-statements,too-many-branches,too logger.info(magenta("Zero Tweak mutants analyzed\n")) # Reset mutant counts before moving on to the next file - if very_verbose: - logger.info(blue("Reseting mutant counts to zero")) total_mutant_counts[0] = 0 total_mutant_counts[1] = 0 total_mutant_counts[2] = 0 diff --git a/slither/tools/mutator/mutators/abstract_mutator.py b/slither/tools/mutator/mutators/abstract_mutator.py index cb435f856..2e99466d9 100644 --- a/slither/tools/mutator/mutators/abstract_mutator.py +++ b/slither/tools/mutator/mutators/abstract_mutator.py @@ -29,7 +29,6 @@ def __init__( # pylint: disable=too-many-arguments contract_instance: Contract, solc_remappings: Union[str, None], verbose: bool, - very_verbose: bool, output_folder: Path, dont_mutate_line: List[int], rate: int = 10, @@ -44,7 +43,6 @@ def __init__( # pylint: disable=too-many-arguments self.timeout = timeout self.solc_remappings = solc_remappings self.verbose = verbose - self.very_verbose = very_verbose self.output_folder = output_folder self.contract = contract_instance self.in_file = self.contract.source_mapping.filename.absolute @@ -98,7 +96,6 @@ def mutate(self) -> Tuple[List[int], List[int], List[int]]: self.timeout, self.solc_remappings, self.verbose, - self.very_verbose, ) # count the uncaught mutants, flag RR/CR mutants to skip further mutations @@ -132,18 +129,4 @@ def mutate(self) -> Tuple[List[int], List[int], List[int]]: else: self.total_mutant_counts[2] += 1 - if self.very_verbose: - if self.NAME == "RR": - logger.info( - f"Found {self.uncaught_mutant_counts[0]} uncaught revert mutants so far (out of {self.total_mutant_counts[0]} that compile)" - ) - elif self.NAME == "CR": - logger.info( - f"Found {self.uncaught_mutant_counts[1]} uncaught comment mutants so far (out of {self.total_mutant_counts[1]} that compile)" - ) - else: - logger.info( - f"Found {self.uncaught_mutant_counts[2]} uncaught tweak mutants so far (out of {self.total_mutant_counts[2]} that compile)" - ) - return self.total_mutant_counts, self.uncaught_mutant_counts, self.dont_mutate_line diff --git a/slither/tools/mutator/utils/testing_generated_mutant.py b/slither/tools/mutator/utils/testing_generated_mutant.py index d62fc3ff0..d484ff68f 100644 --- a/slither/tools/mutator/utils/testing_generated_mutant.py +++ b/slither/tools/mutator/utils/testing_generated_mutant.py @@ -91,7 +91,6 @@ def test_patch( # pylint: disable=too-many-arguments timeout: int, mappings: Union[str, None], verbose: bool, - very_verbose: bool, ) -> int: """ function to verify whether each patch is caught by tests @@ -118,7 +117,7 @@ def test_patch( # pylint: disable=too-many-arguments return 0 # uncaught else: - if very_verbose: + if verbose: logger.info( yellow( f"[{generator_name}] Line {patch['line_number']}: '{patch['old_string']}' ==> '{patch['new_string']}' --> COMPILATION FAILURE"