def used

bolt@1.27.0.0 · src/rules/style/noqa.bend:40

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
import bolt@1.27.0.0/src/codes.bend as Codes

40# a graded finding at the path, on the line, has the code
41def used(gs: List<&2, F.Graded>, +path: String, +line: U32, +code: String) -> Bool:
42  match gs:
43    case Nil{}:
44      False{}
45    case Con{F.Graded{_ll, F.Finding{p, l, _col, _len, rule, _msg}}, rest}:
46      Lazy.or_else(
47        Lazy.and_then(String.eq(p, path),
48          _u => Lazy.and_then(U32.is_eq(l, line), _v => String.eq(Codes.code(rule), code))),
49        _w => used(rest, path, line, code))

Uses (11)

Used by (1)