Skip to content

Commit 05db8c0

Browse files
authored
Merge pull request #2697 from crytic/dev-improve-mutator
slither-mutate: Check if a contract is an interface properly
2 parents dffc692 + b27176d commit 05db8c0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Diff for: slither/tools/mutator/__main__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,7 @@ def main() -> None: # pylint: disable=too-many-statements,too-many-branches,too
265265
if target_contract == skip_flag:
266266
continue
267267

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

Diff for: slither/tools/mutator/mutators/LIR.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

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

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

0 commit comments

Comments
 (0)