CLAUDE.md: scope the no-named-returns rule to implementations - #245
Open
thedavidmeister wants to merge 1 commit into
Open
thedavidmeister wants to merge 1 commit into
thedavidmeister wants to merge 1 commit into
Conversation
`ICloneableV2.initialize` declares `returns (bytes32 success)`. Every `returns` with a body behind it is unnamed, so the rule holds for implementations and it is the declaration case it never scoped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 41 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
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.
Closes #116
- No named return values.was stated flat, in a conventions list whose siblingbullets explicitly govern interfaces.
src/interface/ICloneableV2.sol:50isthe only named return component in all of
src/andtest/. A session readingthe bullet either "fixes" a current published declaration, changing its ABI
output names and forcing a republish for consumers, or learns that the
conventions list is unreliable.
Every
returnsin the repo with a body behind it is unnamed — the library'snine, the six test concretes', the test contracts' — so the rule is true of
implementations, and the case it never scoped is the declaration, where a name
is documentation rather than a local variable. That is the property the bullet
now carries, rather than an exception list naming one file.
The road not taken. The issue's pass4 member proposes the other resolution:
drop
successfrom the declaration and the now-dangling name token from its@returntag, leaving the bullet flat. That is a one-token change to apublished interface, and correctness over consumer compatibility would favour
it. It is not taken here because
src/interface/ICloneableV2.solbelongs to adifferent batch of this audit (#150 rewrites its NatSpec) and two branches must
not edit one file. If you prefer that direction, this is the PR to drop.
CLAUDE.md is 3826 bytes on this branch against the 4096
agent-context-cap(3807 on main).
QA
never assert doc text. Pinning declaration names in a test is also an ABI
snapshot, which is ruled out.
src/ortest/code changed.returnsdeclaration insrc/andtest/, enumerated —one named, the rest unnamed.
against the tree. Versions, compiler settings and the Soldeer bullet all hold
as written; this was the only one with a counterexample in the repo.
🤖 Generated with Claude Code