fix: do not report libraries as dead code

pull/2476/head
alpharush 6 months ago
parent 900fda77c1
commit 2e6508f28b
  1. 3
      slither/detectors/functions/dead_code.py

@ -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