Skip to content

Fix detector documentation typos#3031

Open
TUPM96 wants to merge 1 commit into
crytic:masterfrom
TUPM96:fix/detector-doc-typos
Open

Fix detector documentation typos#3031
TUPM96 wants to merge 1 commit into
crytic:masterfrom
TUPM96:fix/detector-doc-typos

Conversation

@TUPM96
Copy link
Copy Markdown

@TUPM96 TUPM96 commented May 25, 2026

Summary

  • Fix Solidity syntax typos in detector documentation examples.
  • Correct the incorrect-modifier example typo and dead-code wording.
  • Replace the old Ethereum wiki pull-over-push link with the current Solidity withdrawal-pattern docs.
  • Keep docs/src/detectors/Detector-Documentation.md in sync with the detector WIKI_* 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.py
  • uv 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.py
  • git diff --check

Copilot AI review requested due to automatic review settings May 25, 2026 07:48
@TUPM96 TUPM96 requested a review from smonicas as a code owner May 25, 2026 07:48
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix typos in detectors documentation

4 participants