def dispatch

bolt@1.26.0.0 · main.bend:24

import bolt@1.26.0.0/main.bend as Bolt
import Base
import bolt@1.26.0.0/src/args.bend as Args
import bolt@1.26.0.0/src/lint.bend as Lint
import bolt@1.26.0.0/src/check.bend as Check
import bolt@1.26.0.0/src/lsp/run.bend as Lsp
import bolt@1.26.0.0/src/lsp/checker/bend.bend as BendChecker

24# what a subcommand runs, over the files after it
25def dispatch(cmd: Args.Cmd, paths: List<&2, String>) -> IO(Unit):  # noqa: L001 IO driver
26  match cmd:
27    case Args.CLint{}:
28      Lint.run(paths)
29    case Args.CCheck{}:
30      Check.run(~BendChecker.service(), paths)
31    case Args.CLsp{}:
32      Lsp.run()

Uses (9)

Used by (1)