def keep
bolt@1.27.0.0 · src/noqa.bend:244
import bolt@1.27.0.0/src/noqa.bend as Noqa
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/codes.bend as Codes
244
245def keep(+ms: List<&2, Marks>, gs: List<&2, F.Graded>) -> List<&2, F.Graded>:
246 match gs:
247 case Nil{}:
248 Nil{}
249 case Con{F.Graded{ll, F.Finding{+path, +line, col, len, +rule, msg}}, rest}:
250 +more = keep(ms, rest)
251 Bool.pick(List<&2, F.Graded>, silenced(ms, path, line, Codes.code(rule)), more,
252 F.Graded{ll, F.Finding{path, line, col, len, rule, msg}} <> more)