Skip to content

slither-mutate: Check if a contract is an interface properly #2697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions slither/tools/mutator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,7 @@ def main() -> None: # pylint: disable=too-many-statements,too-many-branches,too
if target_contract == skip_flag:
continue

# TODO: find a more specific way to omit interfaces
# Ideally, we wouldn't depend on naming conventions
if target_contract.name.startswith("I"):
if target_contract.is_interface:
logger.debug(f"Skipping mutations on interface {filename}")
continue

Expand Down
2 changes: 1 addition & 1 deletion slither/tools/mutator/mutators/LIR.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class LIR(AbstractMutator): # pylint: disable=too-few-public-methods
NAME = "LIR"
HELP = "Literal Interger Replacement"
HELP = "Literal Integer Replacement"

def _mutate(self) -> Dict: # pylint: disable=too-many-branches
result: Dict = {}
Expand Down