~/bend-docscommunity

bolt/rules/suspicious/unused.bend fails

raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/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 the parameters of a foreign def, which its C and JS bodies read.

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