Directives.Open.latest: 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 594-616 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=594&end_line=616 import Base import bend-lint-api@0.2.0.0/shared/lists.bend as Lists # The latest open begin of an action and a rule. def Open.latest( open: List<&2, Directive>, found: Maybe<&2, Directive>, +action: String, +rule: String ) -> Maybe<&2, Directive>: match open found: case _ Some{d}: Some{d} case Nil{} None{}: None{} case Con{Directive{+a, s, +r, sev, c, i}, rest} None{}: Open.latest( rest, Lists.when( Directive, String.eq(Action.show(a), action) && String.eq(r, rule), Directive{a, s, r, sev, c, i} ), action, rule ) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/shared/lists.bend&name=when https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Action.show https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Directive