def reportable

bolt@1.27.0.0 · src/rules/suspicious/unused.bend:87

import bolt@1.27.0.0/src/rules/suspicious/unused.bend as Unused
import Base
import bolt@1.27.0.0/src/syntax/bind.bend as Bind

87# does a binder of this kind count? Erased and foreign parameters do not
88def reportable(kk: Bind.BindKind, +note: String, +line: U32, +foreign_lines: List<&2, U32>) -> Bool:
89  match kk:
90    case Bind.KLocal{}:
91      True{}
92    case Bind.KParam{}:
93      Bool.and(Bool.not(String.starts_with(note, "-")), Bool.not(List.contains(~U32, ~U32.is_eq, foreign_lines, line)))
94    case other:
95      False{}

Uses (10)

Used by (1)