def Said.checked

bend-lint-rules@0.2.0.0 · lib/linter/directives.bend:478

import bend-lint-rules@0.2.0.0/lib/linter/directives.bend as Directives
import Base
import bend-lint-api@0.2.0.0/shared/names.bend as Names
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

478def Said.checked(why: Maybe<&2, String>, draft: Draft, comment: Comment, index: U32) -> Said:
479  match why draft:
480    case Some{w} _:
481      Wrong{comment, w}
482    case None{} Draft{Keyword{action, scope}, Target{rule, pinned}, reasons}:
483      Said{
484        Directive{
485          action,
486          scope,
487          rule,
488          Maybe.bind(
489            &2,
490            String,
491            Lint.Severity,
492            pinned,
493            p => Names.lookup(Lint.Severity, p, Lint.Severity.names())
494          ),
495          comment,
496          index
497        }
498      }

Uses (13)

Used by (1)