def call

bolt@1.27.0.0 · src/rules/pedantic/strict.bend:54

import bolt@1.27.0.0/src/rules/pedantic/strict.bend as Strict
import Base
import bolt@1.27.0.0/src/finding.bend as F

54# a name, then a group: a finding when the name is the def, the group a `(`
55# call and the stretch hot, then what the group and the rest report
56def call(
57  +tt: String,
58  +ll: U32,
59  +cc: U32,
60  +oo: String,
61  +name: String,
62  +path: String,
63  +hot: Bool,
64  kids: List<&2, F.Finding>,
65  rest: List<&2, F.Finding>
66) -> List<&2, F.Finding>:
67  +more = List.concat(&2, F.Finding, [kids, rest])
68  Bool.pick(List<&2, F.Finding>, Bool.and(Bool.and(String.eq(oo, "("), String.eq(tt, name)), hot),
69    F.Finding{path, ll, cc, U32.from_nat(String.length(name)), "strict",
70      name ++ " calls itself inside Bool.and or Bool.or, which evaluate both sides, so there is no short-circuit; match on the Bool in a helper."} <> more,
71    more)

Uses (12)

Used by (1)