Skip to content

Commit

Permalink
fix: do not report libraries as dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalpharush committed Jun 5, 2024
1 parent 900fda7 commit 2e6508f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion slither/detectors/functions/dead_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ def _detect(self) -> List[Output]:
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"]
Expand Down

0 comments on commit 2e6508f

Please sign in to comment.