def check.codes
bolt@1.27.0.0 · src/rules/style/noqa.bend:60
import bolt@1.27.0.0/src/rules/style/noqa.bend as Noqa
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
import bolt@1.27.0.0/src/finding.bend as F
60
61def check.codes(
62 cs: List<&2, String>,
63 +whole: Bool,
64 +path: String,
65 +line: U32,
66 +col: U32,
67 +len: U32,
68 +gs: List<&2, F.Graded>
69) -> List<&2, F.Finding>:
70 match cs:
71 case Nil{}:
72 Nil{}
73 case Con{+c, rest}:
74 +more = check.codes(rest, whole, path, line, col, len, gs)
75 +bad = Lazy.and_then(judged(whole, c), _u => Bool.not(used(gs, path, line, c)))
76 +msg = say(c)
77 Bool.pick(List<&2, F.Finding>, bad, F.Finding{path, line, col, len, "noqa", msg} <> more, more)