src/check.bend checks
raw source on the hub · import 0x013e0f9a479bbebad5ed196725eede95/src/check.bend as Check
src/check: bolt check file..: the checker (bend) on each file, its
errors in bolt's shape, path:line:1: error: message (bend reports no
column; a message's further lines are indented under it), then the count.
A file bend could not be run on is one error, path:1:1: error: could not
run bend, and never clean.
What a check prints and how it exits is out's decision over what bend
reported (src/LAWS.bend proves it); run only does it.
4 imports
import Base import ./status.bend as Status import ./lsp/report.bend as Rep import ./lsp/checker/answer.bend as Checker
Types
type Run source · line 43 · raw
Data
a file checked: its path and the diagnostics bend reported for it, or a file bend could not be run on
Run@path:String -> @ds:List<&2, 0x013e0f9a479bbebad5ed196725eede95/src/lsp/report.Diag> -> Run
Failed@path:String -> Run
type Out source · line 48 · raw
Data
what a check prints, line by line, and the code it exits with
Out@lines:List<&2, String> -> @code:U32 -> Out
Definitions
def rest_lines source · line 14 · raw
@ls:List<&2, String> -> String
a message's lines after the first, indented
def message.of source · line 22 · raw
@ls:List<&2, String> -> String
a message's lines: the first, then the rest indented
def message source · line 30 · raw
@msg:String -> String
a message: its first line, the rest indented
def show_all source · line 34 · raw
@ds:List<&2, 0x013e0f9a479bbebad5ed196725eede95/src/lsp/report.Diag> -> @+path:String -> List<&2, String>
each diagnostic as a line
def lines_of source · line 52 · raw
@runs:List<&2, Run> -> List<&2, String>
every run's error lines, in order
def out.at source · line 63 · raw
@ls:List<&2, String> -> @count:Nat -> Out
the error lines, then clean or the count, and the exit code: 1 when
there is any error
def out source · line 73 · raw
@runs:List<&2, Run> -> Out
what a check prints and how it exits, from what bend reported for each file
def print_all source · line 78 · raw
@lines:List<&2, String> -> IO(Unit)
each line printed
def run_of source · line 88 · raw
@path:String -> @aa:0x013e0f9a479bbebad5ed196725eede95/src/lsp/checker/answer.Answer -> Run
a file's run, from the checker's answer for it
def perform source · line 107 · raw
@oo:Out -> IO(Unit)
what out decided, done (BOLT-TRUST-9): its lines printed, then its code
Templates
template check_all source · line 96 · raw
@-ck:0x013e0f9a479bbebad5ed196725eede95/src/lsp/checker/answer.Checker -> @paths:List<&2, String> -> IO(List<&2, Run>)
every file checked, in order: what bend reported for each
template run source · line 115 · raw
@-ck:0x013e0f9a479bbebad5ed196725eede95/src/lsp/checker/answer.Checker -> @paths:List<&2, String> -> IO(Unit)
the checker over the files given, exiting 1 when any of them had an error (main passes checker/bend.bend's service)