lloyAlloy on GitHub
manual_safe_access
Docs

manual_safe_access

Updated
stylewarn

a and a.b, the guard written by hand.

Flux. a and a.b reads a twice to guard one index. a?.b is the guard: it stops at nil and yields nil. With or after it, a?.b ?? x is the same when b is never false; the lint leaves that rewrite to the author. alloy flux --fix rewrites the plain form.

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