UnneededPlus.judged: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/language/unneeded_plus.bend as UnneededPlus Lines 124-158 of bend-lint-rules@0.2.0.0/language/unneeded_plus.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/language/unneeded_plus.bend&start_line=124&end_line=158 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint import bend-lint-api@0.2.0.0/shared/lists.bend as Lists # The findings about a `+` binder (`binder`, if the node declares one) that its facts say its body uses at most once. def judged( binder: Maybe<&2, U32>, +parameter: Bool, +owner: Owner, +span: Maybe<&2, Lint.Span>, +name: String, facts: List<&2, Lint.Fact>, out: List<&2, Lint.Finding> ) -> List<&2, Lint.Finding>: match binder facts: case Some{+b} Con{Lint.Fact{Lint.OfBinder{}, q, used, t}, rest}: judged( Some{b}, parameter, owner, span, name, rest, Lists.onto( &2, Lint.Finding, Lint.finding( Lint.Hint{}, is_needless(is_once(used), parameter, owner, b), span, message(name) ), out ) ) case Some{+b} Con{f, rest}: judged(Some{b}, parameter, owner, span, name, rest, out) case _ _: List.reverse(&2, Lint.Finding, out) Uses (17): 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=List.reverse 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=U32 https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Fact https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Role https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Severity https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Span https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=finding https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/shared/lists.bend&name=onto https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/unneeded_plus.bend&name=Owner https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/unneeded_plus.bend&name=is_needless https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/unneeded_plus.bend&name=is_once https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/unneeded_plus.bend&name=message