prefer_const
UpdatedA local that nothing assigns again.
local x = v with no later x = ... holds one value, and const x = v says so: a write added later is a compile error instead of a quiet change. A local whose value the file writes into, with t.x = 1 or t[k] = v, stays local. const_mutation reads the same field and index writes, so a const that this lint asks for never draws const_mutation, and a local that would draw it as a const never draws this lint. A guard, if not local x = f() then return end, binds x for the rest of the block, and a write after it counts. A call of a std writer method such as t:push(v), in any expression, also keeps a local local. alloy flux --fix writes const, and so does alloy fmt unless [fmt] prefer_const = false.
Set its level in the [lint] table of alloy.toml, or for one file with --@alloy-lint.
