Skip to content

fix: remove redundant statement flagged by slither (unblocks rainix-sol-static)#476

Open
thedavidmeister wants to merge 1 commit into
mainfrom
2026-06-14-flow-slither-redundant-statement
Open

fix: remove redundant statement flagged by slither (unblocks rainix-sol-static)#476
thedavidmeister wants to merge 1 commit into
mainfrom
2026-06-14-flow-slither-redundant-statement

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The recent slither bump in the rainix flake enables the redundant-statements detector, which now flags a no-op standalone statement on src/concrete/Flow.sol:

Detector: redundant-statements
Redundant expression "evaluableConfigs (src/concrete/Flow.sol#121)" in Flow (src/concrete/Flow.sol#84-278)

slither . exits non-zero before forge fmt --check runs in rainix-sol-static, so this fails static on main and blocks every flow PR (#459 included).

Origin of the line

The no-op evaluableConfigs; was added in #465 (commit 7c309b21, "add @param tag to typed initialize overload", Closes #349) — not the doc-only #466. That PR named the previously-unnamed parameter of the typed initialize(EvaluableConfigV3[]) revert overload and added the self-reference purely to silence the resulting unused-parameter warning (per its own commit message: "The no-op self-reference quiets the unused-parameter warning").

Fix

Remove the no-op and drop the now-unused parameter name (reverting to EvaluableConfigV3[] memory — unnamed parameters never trigger an unused-parameter warning, which is the convention this file used before #465). The NatSpec is updated to drop the dangling @param and note the parameter is unnamed because the function reverts before reading it. No compiler-warning re-introduction: forge build is clean.

Verification (rainix sol-shell)

  • slither .0 results (was 1; no new findings introduced)
  • forge buildCompiler run successful!, no unused-var/param warning from src/ (the two unsafe-typecast warnings are pre-existing, in test files)
  • forge fmt --check → exit 0
  • forge test55 passed, 0 failed, 0 skipped

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Summary by CodeRabbit

  • Refactor
    • Updated function signature for improved code clarity.

The slither bump in the rainix flake now enables the
redundant-statements detector, which flags the no-op
`evaluableConfigs;` self-reference on src/concrete/Flow.sol line 121.
That statement was added (in #465) only to silence the
unused-parameter warning introduced by naming the parameter of the
typed `initialize(EvaluableConfigV3[])` revert overload.

slither exits non-zero before `forge fmt --check` runs, so this fails
rainix-sol-static on main and blocks every flow PR.

Remove the no-op and drop the now-unused parameter name (unnamed
parameters never warn), matching the pre-#465 convention this file
already used. NatSpec updated to drop the dangling @param. slither is
clean (0 results) and the build is warning-free.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Jun 14, 2026
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 19cd1b90-78ab-466f-8baf-168110951e8e

📥 Commits

Reviewing files that changed from the base of the PR and between 772e568 and 1dfdd5f.

📒 Files selected for processing (1)
  • src/concrete/Flow.sol

Walkthrough

In src/concrete/Flow.sol, the typed initialize(EvaluableConfigV3[] memory) overload has its parameter name (evaluableConfigs) removed. The function body is unchanged — it still immediately reverts with InitializeSignatureFn and never reads the parameter.

Changes

initialize overload parameter name removal

Layer / File(s) Summary
initialize overload signature and docs
src/concrete/Flow.sol
Parameter name removed from initialize(EvaluableConfigV3[] memory) overload (was evaluableConfigs); doc block updated to match. ABI behavior and revert logic are unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR partially addresses issue #349 by updating NatSpec documentation and removing the redundant statement for the initialize overload, but does not address the first objective regarding the missing @param tag for BadMinStackLength. Verify whether issue #349 requires both objectives to be addressed in a single PR or if they can be handled separately.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: removing a redundant statement flagged by Slither, which unblocks the rainix-sol-static checks.
Out of Scope Changes check ✅ Passed The PR scope is tightly focused on removing the redundant statement and updating NatSpec for the initialize overload as described in the objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-06-14-flow-slither-redundant-statement

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[A01-5] [INFO] BadMinStackLength and initialize overload missing @param tags

1 participant