def forks
import bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend as BangAfterForkimport Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import bend-lint-api@0.2.0.0/shared/sets.bend as Sets
55# Whether `nodes` fork on the host when they run: a call among them or under them, made without `!`, is of a
56# definition under which a parallel let runs.
57def forks(nodes: List<&2, Lint.Node>, program: Program) -> Bool:
58 match program:
59 case Program{defs, under, bangs}:
60 Sets.has_any(Lint.visit(~List<&2, U32>, ~String, ~host.visit, bangs, nodes), under, False{})