diff --git a/slither/detectors/attributes/const_functions_asm.py b/slither/detectors/attributes/const_functions_asm.py index d4970f9547..12ca31395e 100644 --- a/slither/detectors/attributes/const_functions_asm.py +++ b/slither/detectors/attributes/const_functions_asm.py @@ -45,7 +45,7 @@ class ConstantFunctionsAsm(AbstractDetector): uint counter; function get() public view returns(uint){ counter = counter +1; - return counter + return counter; } } ``` diff --git a/slither/detectors/attributes/const_functions_state.py b/slither/detectors/attributes/const_functions_state.py index f80401bb3f..db3ac42cc2 100644 --- a/slither/detectors/attributes/const_functions_state.py +++ b/slither/detectors/attributes/const_functions_state.py @@ -45,7 +45,7 @@ class ConstantFunctionsState(AbstractDetector): uint counter; function get() public view returns(uint){ counter = counter +1; - return counter + return counter; } } ``` diff --git a/slither/detectors/functions/dead_code.py b/slither/detectors/functions/dead_code.py index 3cc903c1d7..8fd32a456c 100644 --- a/slither/detectors/functions/dead_code.py +++ b/slither/detectors/functions/dead_code.py @@ -30,7 +30,7 @@ class DeadCode(AbstractDetector): WIKI_EXPLOIT_SCENARIO = """ ```solidity contract Contract{ - function dead_code() internal() {} + function dead_code() internal {} } ``` `dead_code` is not used in the contract, and make the code's review more difficult.""" diff --git a/slither/detectors/reentrancy/reentrancy_benign.py b/slither/detectors/reentrancy/reentrancy_benign.py index b526b0ae7f..06c39f7339 100644 --- a/slither/detectors/reentrancy/reentrancy_benign.py +++ b/slither/detectors/reentrancy/reentrancy_benign.py @@ -40,7 +40,7 @@ class ReentrancyBenign(Reentrancy): if( ! (msg.sender.call()() ) ){ throw; } - counter += 1 + counter += 1; } ``` diff --git a/slither/detectors/reentrancy/reentrancy_no_gas.py b/slither/detectors/reentrancy/reentrancy_no_gas.py index 2a9926d456..5662b9b3bc 100644 --- a/slither/detectors/reentrancy/reentrancy_no_gas.py +++ b/slither/detectors/reentrancy/reentrancy_no_gas.py @@ -44,7 +44,7 @@ class ReentrancyNoGas(Reentrancy): WIKI_EXPLOIT_SCENARIO = """ ```solidity function callme(){ - msg.sender.transfer(balances[msg.sender]): + msg.sender.transfer(balances[msg.sender]); balances[msg.sender] = 0; } ``` diff --git a/slither/detectors/statements/calls_in_loop.py b/slither/detectors/statements/calls_in_loop.py index af6663bb71..77a39b5fd6 100644 --- a/slither/detectors/statements/calls_in_loop.py +++ b/slither/detectors/statements/calls_in_loop.py @@ -94,7 +94,7 @@ class MultipleCallsInLoop(AbstractDetector): If one of the destinations has a fallback function that reverts, `bad` will always revert.""" # endregion wiki_exploit_scenario - WIKI_RECOMMENDATION = "Favor [pull over push](https://github.com/ethereum/wiki/wiki/Safety#favor-pull-over-push-for-external-calls) strategy for external calls." + WIKI_RECOMMENDATION = "Favor [pull over push](https://consensysdiligence.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/#favor-pull-over-push-for-external-calls) strategy for external calls." def _detect(self) -> list[Output]: """""" diff --git a/slither/detectors/variables/uninitialized_local_variables.py b/slither/detectors/variables/uninitialized_local_variables.py index ab3853d0e6..85889fda3d 100644 --- a/slither/detectors/variables/uninitialized_local_variables.py +++ b/slither/detectors/variables/uninitialized_local_variables.py @@ -28,7 +28,7 @@ class UninitializedLocalVars(AbstractDetector): contract Uninitialized is Owner{ function withdraw() payable public onlyOwner{ address to; - to.transfer(this.balance) + to.transfer(this.balance); } } ```