def per_file.role
bolt@1.27.0.0 · src/lint/plan.bend:378
import bolt@1.27.0.0/src/lint/plan.bend as Plan
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/src.bend as Src
import bolt@1.27.0.0/src/role.bend as Role
import bolt@1.27.0.0/src/rules.bend as Rules
378
379
380def per_file.role(+ms: List<&2, Role.Mark>, ss: List<&2, Src.Src>) -> List<&2, F.Finding>:
381 match ss:
382 case Nil{}:
383 Nil{}
384 case Con{s, rest}:
385 Src.Src{+path, text, toks, tree, bound, items} = s
386 List.concat(&2, F.Finding, [Rules.on.role(Role.of(ms, path), Src.Src{path, text, toks, tree, bound, items}),
387 per_file.role(ms, rest)])