Directives.Covering.of: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/lib/linter/directives.bend as Directives Lines 727-755 of bend-lint-rules@0.2.0.0/lib/linter/directives.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&start_line=727&end_line=755 import Base # The lines a directive covers; `last` is the file's last line. def Covering.of( said: Said, lines: List<&2, Bool>, closed: List<&2, Closed>, last: U32 ) -> Maybe<&2, Covering>: match said: case Said{Directive{a, WholeFile{}, r, sev, c, i}}: Some{Covering{Directive{a, WholeFile{}, r, sev, c, i}, 0, last}} case Said{Directive{a, SameLine{}, r, sev, Comment{b, e, +l, t, body}, i}}: Some{Covering{Directive{a, SameLine{}, r, sev, Comment{b, e, l, t, body}, i}, l, l}} case Said{Directive{a, NextLine{}, r, sev, Comment{b, e, +l, t, body}, i}}: Some{ Covering.next( Directive{a, NextLine{}, r, sev, Comment{b, e, l, t, body}, i}, Lines.next_code(lines, None{}, 0, l) ) } case Said{Directive{a, Begin{}, r, sev, Comment{b, e, +l, t, body}, +i}}: Some{ Covering{ Directive{a, Begin{}, r, sev, Comment{b, e, l, t, body}, i}, l, Maybe.default(&2, U32, Closed.find(closed, None{}, i), last) } } case _: None{} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe.default https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Closed https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Closed.find https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Comment https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Covering https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Covering.next https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Directive https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Lines.next_code https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Said https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Scope