def check.go
bolt@1.27.0.0 · src/rules/suspicious/concat.bend:234
import bolt@1.27.0.0/src/rules/suspicious/concat.bend as Concat
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/rules/calls.bend as Calls
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
234def check.go(ds: List<&2, Calls.Def>, +path: String, acc: List<&2, List<&2, F.Finding>>) -> List<&2, F.Finding>:
235 match ds:
236 case Nil{}:
237 List.concat(&2, F.Finding, List.reverse(&2, List<&2, F.Finding>, acc))
238 case Con{Calls.Def{+name, +sig, body}, rest}:
239 check.go(rest, path,
240 Lazy.stop(List<&2, F.Finding>, Calls.exempt(path, sig), [],
241 _u => walk(body, name, Calls.names(sig), [], path)) <> acc)