~/bend-docscommunity

src/rules/suspicious/unused.bend fails

raw source on the hub · import 0xde9bb08f7de298b03207fb5797ede9a5/src/rules/suspicious/unused.bend as Unused

rule unused: a name bound by a let, a do-bind, a lambda, or as a parameter is never used. Pattern binders are exempt: naming every field of Tok{k, t, l, c} reads better than _. So are names starting with _, erased parameters (-x), which exist to be unused, a law's for names (hypotheses the proof takes by position), and every parameter of a foreign def (one whose body starts with import), which its C and JS bodies read, however its header is wrapped.

7 imports
import Base
import ../../src.bend as Src
import ../../lazy/lazy.bend as Lazy
import ../../finding.bend as F
import ../../syntax/bind.bend as Bind
import ../../syntax/tree.bend as Tree
import ../../syntax/lex.bend as Lex