def judged

bend-lint-rules@0.2.0.0 · performance/unused_result.bend:155

import bend-lint-rules@0.2.0.0/performance/unused_result.bend as UnusedResult
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import bend-lint-api@0.2.0.0/shared/lists.bend as Lists
import bend-lint-rules@0.2.0.0/performance/gpu_fit.bend as GpuFit

155# The findings about the unused binders whose types, as shown, are data: not numbers, nor records of numbers only.
156def judged(
157  found: List<&2, Unused>,
158  shown: List<&2, String>,
159  +slots: List<&2, GpuFit.Slot>,
160  out: List<&2, Lint.Finding>
161) -> List<&2, Lint.Finding>:
162  match found shown:
163    case Con{Unused{span, name, loop, t}, rest} Con{ty, more}:
164      judged(
165        rest,
166        more,
167        slots,
168        Lists.onto(
169          &2,
170          Lint.Finding,
171          Lint.finding(
172            Lint.Information{},
173            Bool.not(GpuFit.is_flat(64n, Some{[ty]}, slots)),
174            Some{span},
175            message(name, loop)
176          ),
177          out
178        )
179      )
180    case _ _:
181      List.reverse(&2, Lint.Finding, out)

Uses (13)

Used by (1)