Fix detector documentation typos#3031
Open
TUPM96 wants to merge 1 commit into
Open
Conversation
|
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates Slither detector wiki/documentation snippets to be syntactically correct Solidity and refreshes a recommendation link.
Changes:
- Fix Solidity snippet syntax (missing semicolons, invalid tokens/keywords) across multiple detectors.
- Correct a typo in a modifier example and tweak a grammar issue in the dead code description.
- Update the “pull over push” recommendation link to the Solidity docs site.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| slither/detectors/variables/uninitialized_local_variables.py | Fixes Solidity example snippet by adding a missing semicolon. |
| slither/detectors/statements/calls_in_loop.py | Updates recommendation URL to Solidity documentation. |
| slither/detectors/reentrancy/reentrancy_no_gas.py | Fixes Solidity example snippet punctuation (colon → semicolon). |
| slither/detectors/reentrancy/reentrancy_benign.py | Adds missing semicolon in Solidity example snippet. |
| slither/detectors/functions/modifier.py | Fixes typo in Solidity keyword modifier in example snippet. |
| slither/detectors/functions/dead_code.py | Makes Solidity example signature valid and adjusts grammar in description. |
| slither/detectors/attributes/const_functions_state.py | Adds missing semicolon in Solidity example snippet. |
| slither/detectors/attributes/const_functions_asm.py | Adds missing semicolon in Solidity example snippet. |
| docs/src/detectors/Detector-Documentation.md | Mirrors the snippet/link/grammar fixes in the rendered docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function withdraw() payable public onlyOwner{ | ||
| address to; | ||
| to.transfer(this.balance) | ||
| to.transfer(this.balance); |
| function withdraw() payable public onlyOwner{ | ||
| address to; | ||
| to.transfer(this.balance) | ||
| to.transfer(this.balance); |
| } | ||
| ``` | ||
| `dead_code` is not used in the contract, and make the code's review more difficult.""" | ||
| `dead_code` is not used in the contract, and makes the code's review more difficult.""" |
| ``` | ||
|
|
||
| `dead_code` is not used in the contract, and make the code's review more difficult. | ||
| `dead_code` is not used in the contract, and makes the code's review more difficult. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
incorrect-modifierexample typo and dead-code wording.docs/src/detectors/Detector-Documentation.mdin sync with the detectorWIKI_*strings.Fixes #1206
Testing
codespell docs/src/detectors/Detector-Documentation.md slither/detectors/attributes/const_functions_asm.py slither/detectors/attributes/const_functions_state.py slither/detectors/variables/uninitialized_local_variables.py slither/detectors/statements/calls_in_loop.py slither/detectors/reentrancy/reentrancy_benign.py slither/detectors/functions/dead_code.py slither/detectors/reentrancy/reentrancy_no_gas.py slither/detectors/functions/modifier.pyuv run ruff check slither/detectors/attributes/const_functions_asm.py slither/detectors/attributes/const_functions_state.py slither/detectors/variables/uninitialized_local_variables.py slither/detectors/statements/calls_in_loop.py slither/detectors/reentrancy/reentrancy_benign.py slither/detectors/functions/dead_code.py slither/detectors/reentrancy/reentrancy_no_gas.py slither/detectors/functions/modifier.pygit diff --check