def Applied.go

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

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

845# The findings, each with where it starts (`at`, in order), sorted by the directives that cover their lines.
846def Applied.go(
847  founds: List<&2, Lint.Found>,
848  at: List<&2, Text.Position>,
849  +coverings: List<&2, Covering>,
850  a: Applied
851) -> Applied:
852  match founds at:
853    case Con{
854      Lint.Found{+rule, Lint.Finding{+severity, span, message, fixes}},
855      rest
856    } Con{Text.Position{line, column}, more}:
857      Applied.go(
858        rest,
859        more,
860        coverings,
861        Applied.add(
862          Covering.hits(coverings, rule, severity, (line - 1: U32), []),
863          Lint.Found{rule, Lint.Finding{severity, span, message, fixes}},
864          a
865        )
866      )
867    case _ _:
868      a

Uses (10)

Used by (1)