def Found.offsets

bend-lint-rules@0.2.0.0 · lib/linter/directives.bend:950

import bend-lint-rules@0.2.0.0/lib/linter/directives.bend as Directives
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

950# Where each of `founds` starts, in order, onto `out` (last first).
951def Found.offsets(founds: List<&2, Lint.Found>, out: List<&2, U32>) -> List<&2, U32>:
952  match founds:
953    case Nil{}:
954      List.reverse(&2, U32, out)
955    case Con{
956      Lint.Found{rule, Lint.Finding{severity, Lint.Span{path, beg, end}, message, fixes}},
957      rest
958    }:
959      Found.offsets(rest, beg <> out)

Uses (6)

Used by (1)