Concat.walk: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/concat.bend as Concat Lines 210-232 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=210&end_line=232 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 import bolt@1.27.0.0/src/syntax/tree.bend as Tree import bolt@1.27.0.0/src/rules/calls.bend as Calls import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy # every self-call's arguments, with the lets in scope def walk( nn: Tree.Node, +name: String, +params: List<&2, String>, +lets: List<&2, Let>, +path: String ) -> List<&2, F.Finding>: match nn: case Tree.NCons{Tree.Leaf{Lex.Tok{k, +t, l, c}}, Tree.NCons{Tree.Group{Lex.Tok{_, +o, _, _}, +kids, _}, rest}}: +me = Bool.and(String.eq(o, "("), String.eq(t, name)) List.concat(&2, F.Finding, [ Lazy.stop(List<&2, F.Finding>, Bool.not(me), [], _u => hits(Calls.args(kids), params, lets, path, [])), walk(kids, name, params, lets, path), walk(rest, name, params, lets, path)]) case Tree.NCons{Tree.Group{open, kids, close}, rest}: List.concat(&2, F.Finding, [walk(kids, name, params, lets, path), walk(rest, name, params, lets, path)]) case Tree.NCons{Tree.Stmt{kind, +kids, body}, rest}: List.concat(&2, F.Finding, [walk(kids, name, params, lets, path), walk(body, name, params, lets, path), walk(rest, name, params, after(kind, kids, lets), path)]) case Tree.NCons{h, rest}: walk(rest, name, params, lets, path) case other: Nil{} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.concat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq 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/lazy/lazy.bend&name=stop https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=args https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/concat.bend&name=Let https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/concat.bend&name=after https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/concat.bend&name=hits https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node