Merge pull request #2476 from crytic/fixups

fix ordering and dead-code detector
pull/2493/head 0.10.3
alpharush 6 months ago committed by GitHub
commit 798c1f6387
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      slither/__main__.py
  2. 3
      slither/detectors/functions/dead_code.py

@ -239,6 +239,7 @@ def choose_detectors(
set(detectors_to_run), args.detectors_to_include, detectors
)
detectors_to_run = sorted(detectors_to_run, key=lambda x: x.IMPACT)
return detectors_to_run
@ -255,7 +256,6 @@ def __include_detectors(
else:
raise ValueError(f"Error: {detector} is not a detector")
detectors_to_run = sorted(detectors_to_run, key=lambda x: x.IMPACT)
return detectors_to_run

@ -71,9 +71,10 @@ contract Contract{
continue
if isinstance(function, FunctionContract) and (
function.contract_declarer.is_from_dependency()
or function.contract_declarer.is_library
):
continue
# Continue if the functon is not implemented because it means the contract is abstract
# Continue if the function is not implemented because it means the contract is abstract
if not function.is_implemented:
continue
info: DETECTOR_INFO = [function, " is never used and should be removed\n"]

Loading…
Cancel
Save