def visit
bend-lint-rules@0.2.0.0 · performance/template_value_field.bend:126
import bend-lint-rules@0.2.0.0/performance/template_value_field.bend as TemplateValueField
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
126def visit(+owner: Owner, +path: List<&2, Lint.Above>, +node: Lint.Node) -> List<&2, Lint.Finding>:
127 match owner node:
128 case Owner{templates, name} Lint.Node{Lint.Variable{b}, template, span, k, f}:
129 Lint.finding(
130 Lint.Information{},
131 Bool.and(
132 List.contains(~U32, ~U32.is_eq, templates, b),
133 Bool.and(Lint.is_live(path), is_built(path, False{}))
134 ),
135 span,
136 message(template, name)
137 )
138 case _ _:
139 []