Merge pull request #277 from crytic/feature-exclude-optimization-flag

Add --exclude-optimization flag
pull/282/head
Feist Josselin 6 years ago committed by GitHub
commit 5d6ab217a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      slither/__main__.py

@ -203,6 +203,10 @@ def choose_detectors(args, all_detector_classes):
detectors_to_run = sorted(detectors_to_run, key=lambda x: x.IMPACT)
return detectors_to_run
if args.exclude_optimization:
detectors_to_run = [d for d in detectors_to_run if
d.IMPACT != DetectorClassification.OPTIMIZATION]
if args.exclude_informational:
detectors_to_run = [d for d in detectors_to_run if
d.IMPACT != DetectorClassification.INFORMATIONAL]
@ -260,6 +264,7 @@ defaults_flag_in_config = {
'printers_to_run': None,
'detectors_to_exclude': None,
'exclude_dependencies': False,
'exclude_optimization': False,
'exclude_informational': False,
'exclude_low': False,
'exclude_medium': False,
@ -337,6 +342,11 @@ def parse_args(detector_classes, printer_classes):
action='store_true',
default=defaults_flag_in_config['exclude_dependencies'])
group_detector.add_argument('--exclude-optimization',
help='Exclude optimization analyses',
action='store_true',
default=defaults_flag_in_config['exclude_optimization'])
group_detector.add_argument('--exclude-informational',
help='Exclude informational impact analyses',
action='store_true',

Loading…
Cancel
Save