Fromrev.walk: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/fromrev.bend as Fromrev Lines 35-45 of bolt@1.27.0.0/src/rules/suspicious/fromrev.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/suspicious/fromrev.bend&start_line=35&end_line=45 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 # every run of the shape among the tokens, in order def walk(toks: List<&2, Lex.Tok>, +path: String) -> List<&2, F.Finding>: match toks: case Nil{}: Nil{} case Con{Lex.Tok{k, +t, +l, +c}, +rest}: +more = walk(rest, path) Bool.pick(List<&2, F.Finding>, at(t, rest), F.Finding{path, l, c, 16, "fromrev", "String.from_list(List.reverse(..)) walks the list twice and builds one it throws away; fold it onto a String with SCon in one pass."} <> more, more) Uses (6): 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=String 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/rules/suspicious/fromrev.bend&name=at https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok