def calls.one

bolt@1.27.0.0 · src/rules/correctness/put.bend:47

import bolt@1.27.0.0/src/rules/correctness/put.bend as Put
import Base
import bolt@1.27.0.0/src/finding.bend as F

47# a dotted name then an open bracket: a finding when they are `Map.put` and
48# `(`, before what the rest reports
49def calls.one(
50  +tt: String,
51  +oo: String,
52  +ll: U32,
53  +cc: U32,
54  +path: String,
55  +more: List<&2, F.Finding>
56) -> List<&2, F.Finding>:
57  Bool.pick(List<&2, F.Finding>, Bool.and(String.eq(tt, "Map.put"), String.eq(oo, "(")),
58    F.Finding{path, ll, cc, 7, "put", "Map.put does not compare keys, so a new key can overwrite an existing entry; use Map.set."}
59      <> more,
60    more)

Uses (7)

Used by (1)