Skip to content

Commit 798c1f6

Browse files
authored
Merge pull request #2476 from crytic/fixups
fix ordering and dead-code detector
2 parents 353d4da + 2e6508f commit 798c1f6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

slither/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def choose_detectors(
239239
set(detectors_to_run), args.detectors_to_include, detectors
240240
)
241241

242+
detectors_to_run = sorted(detectors_to_run, key=lambda x: x.IMPACT)
242243
return detectors_to_run
243244

244245

@@ -255,7 +256,6 @@ def __include_detectors(
255256
else:
256257
raise ValueError(f"Error: {detector} is not a detector")
257258

258-
detectors_to_run = sorted(detectors_to_run, key=lambda x: x.IMPACT)
259259
return detectors_to_run
260260

261261

slither/detectors/functions/dead_code.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ def _detect(self) -> List[Output]:
7171
continue
7272
if isinstance(function, FunctionContract) and (
7373
function.contract_declarer.is_from_dependency()
74+
or function.contract_declarer.is_library
7475
):
7576
continue
76-
# Continue if the functon is not implemented because it means the contract is abstract
77+
# Continue if the function is not implemented because it means the contract is abstract
7778
if not function.is_implemented:
7879
continue
7980
info: DETECTOR_INFO = [function, " is never used and should be removed\n"]

0 commit comments

Comments
 (0)