def costly
bend-lint-rules@0.2.0.0 · performance/eager_branch.bend:279
import bend-lint-rules@0.2.0.0/performance/eager_branch.bend as EagerBranch
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
279
280
281
282def costly(+sources: List<&2, Lint.Source>, +defs: Map<&2, Maybe<&2, Lint.Def>>) -> Set():
283 Lint.Program.callers(
284 sources,
285 defs,
286 Set.from_list(
287 loops(
288 Map.keys(&2, Maybe<&2, Lint.Def>, defs),
289 defs,
290 Lint.Program.callers(sources, defs, Set.from_list(program.unflat(sources, []))),
291 []
292 )
293 )
294 )