Concat.hit: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/concat.bend as Concat Lines 169-183 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=169&end_line=183 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 the parameter of the argument's own slot def hit( mm: Maybe<&2, Lex.Tok>, +slot: 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>, String.eq(t, slot), F.Finding{path, l, c, U32.from_nat(String.length(t)), "concat", t ++ " is appended to on every step, which copies it each time and makes the loop quadratic; prepend and reverse once at the end, or build with <>."} <> acc, acc) Uses (10): 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=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