def host.visit
bend-lint-rules@0.2.0.0 · performance/bang_after_fork.bend:36
import bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend as BangAfterFork
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
36
37
38def host.visit(
39 +bangs: List<&2, U32>,
40 +path: List<&2, Lint.Above>,
41 +node: Lint.Node
42) -> List<&2, String>:
43 match node:
44 case Lint.Node{
45 Lint.Application{},
46 n,
47 s,
48 Con{Lint.Node{Lint.Reference{t}, rn, Some{Lint.Span{p, beg, end}}, rk, rf}, args},
49 f
50 }:
51 Bool.pick(List<&2, String>, List.contains(~U32, ~U32.is_eq, bangs, end), [], [t])
52 case _:
53 []