Unused.check.go: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/unused.bend as Unused Lines 235-251 of bolt@1.27.0.0/src/rules/suspicious/unused.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/suspicious/unused.bend&start_line=235&end_line=251 import Base import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy import bolt@1.27.0.0/src/finding.bend as F import bolt@1.27.0.0/src/syntax/bind.bend as Bind def check.go( binds: List<&2, Bind.Bind>, +hh: Hits, +uses: List<&2, Bind.Use>, +fl: List<&2, U32>, +path: String ) -> List<&2, F.Finding>: match binds: case Nil{}: Nil{} case Con{Bind.Bind{+name, +line, +col, +kind, note}, rest}: +more = check.go(rest, hh, uses, fl, path) +shown = reportable(kind, note, line, fl) +hit = Bool.and(shown, Bool.not(String.starts_with(name, "_"))) Bool.pick(List<&2, F.Finding>, Lazy.and_then(hit, _u => Bool.not(seen(hh, uses, line, col))), F.Finding{path, line, col, U32.from_nat(String.length(name)), "unused", what(kind) ++ " " ++ name ++ " is never used."} <> more, more) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.starts_with https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lazy/lazy.bend&name=and_then https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/unused.bend&name=Hits https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/unused.bend&name=reportable https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/unused.bend&name=seen https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/unused.bend&name=what https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=Bind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=Use