Skip to content

Commit

Permalink
Merge pull request #2493 from crytic/master
Browse files Browse the repository at this point in the history
sync dev <> master
  • Loading branch information
0xalpharush authored Jun 24, 2024
2 parents f3fbcdc + 798c1f6 commit 84b15a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ body:
-
attributes:
value: |
Please check the issues tab to avoid duplicates.
Please check the issues tab to avoid duplicates, and
confirm that the bug exists on the latest release (upgrade
by running `python3 -m pip install --upgrade slither-analyzer`).
If you are having difficulty installing slither,
please head over to the "Discussions" page.
Thanks for taking the time to fill out this bug report!
type: markdown
-
Expand All @@ -17,7 +21,7 @@ body:
required: true
-
attributes:
description: "It can be a github repo, etherscan link, or code snippet."
description: "It can be a github repo (preferred), etherscan link, or code snippet."
label: "Code example to reproduce the issue:"
placeholder: "`contract A {}`\n"
id: reproduce
Expand All @@ -27,7 +31,7 @@ body:
-
attributes:
description: |
What version of slither are you running?
What version of slither are you running?
Run `slither --version`
label: "Version:"
id: version
Expand Down
2 changes: 1 addition & 1 deletion slither/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


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


Expand Down
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 84b15a6

Please sign in to comment.