lloyAlloy on GitHub
local_then_return
Docs

local_then_return

Updated
stylewarn

local x = v followed by return x.

The local is read once, on the next line, by the return. return v says the same in one statement; a call goes in parentheses, return (f()), so the return keeps one value as the local did. A const x = v reads the same. alloy flux --fix rewrites it.

Set its level in the [lint] table of alloy.toml, or for one file with --@alloy-lint.