Concat.hit.cont: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/concat.bend as Concat Lines 317-331 of bolt@1.27.0.0/src/rules/suspicious/concat.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/suspicious/concat.bend&start_line=317&end_line=331 import Base import bolt@1.27.0.0/src/finding.bend as F import bolt@1.27.0.0/src/syntax/lex.bend as Lex # a finding when the name is one of the reportable parameters def hit.cont( mm: Maybe<&2, Lex.Tok>, +accs: List<&2, String>, +path: String, +acc: List<&2, F.Finding> ) -> List<&2, F.Finding>: match mm: case None{}: acc case Some{Lex.Tok{k, +t, l, c}}: Bool.pick(List<&2, F.Finding>, List.contains(~String, ~String.eq, accs, t), F.Finding{path, l, c, U32.from_nat(String.length(t)), "concat", t ++ " is appended to and passed on through a continuation, which copies it on every step and makes the loop quadratic; prepend each chunk and reverse once at the end."} <> acc, acc) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok