def Unmet.go

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

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

908# The findings about the directives that nothing used: an expect not met, a disable that covered nothing.
909def Unmet.go(
910  coverings: List<&2, Covering>,
911  +used: List<&2, U32>,
912  +path: String,
913  out: List<&2, Lint.Found>
914) -> List<&2, Lint.Found>:
915  match coverings:
916    case Nil{}:
917      List.reverse(&2, Lint.Found, out)
918    case Con{Covering{Directive{a, s, r, sev, Comment{b, e, l, t, body}, i}, from, to}, rest}:
919      Unmet.go(
920        rest,
921        used,
922        path,
923        Unmet.add(List.contains(~U32, ~U32.is_eq, used, i), a, r, sev, Lint.Span{path, b, e}, out)
924      )

Uses (12)

Used by (1)