def paired

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

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

1055def paired(
1056  p: Pairing,
1057  +saids: List<&2, Said>,
1058  +lines: List<&2, Bool>,
1059  linted: Linted,
1060  founds: List<&2, Lint.Found>
1061) -> Suppressed:
1062  match p:
1063    case Pairing{open, closed, wrong}:
1064      covered(
1065        Covering.all(
1066          saids,
1067          lines,
1068          closed,
1069          (U32.from_nat(Lists.length(&2, Bool, lines)) - 1: U32),
1070          []
1071        ),
1072        Pairing.unclosed(open, wrong),
1073        saids,
1074        linted,
1075        founds
1076      )

Uses (14)

Used by (1)