Documentation
¶
Overview ¶
Package compile reads the output of a build or a test run the way emacs's compilation mode does: it cleans what a program printed for a terminal into plain lines, and finds the lines that point at a place in a file - an error, a warning, a failing test - so the editor can take you there.
It knows nothing of buffers or processes. The editor runs the command and feeds each line through here, and decides for itself which of the files a line names exist.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
Clean turns one line of a program's output into plain text: escape sequences go, and a carriage return starts the line over, as it would on a terminal - a progress bar that redraws itself leaves only where it got to. Other control characters, which would only show as noise, are dropped, but a tab stays.
Types ¶
type Loc ¶
type Loc struct {
// File is the path as the line gives it: relative to wherever the
// command ran, as often as not.
File string
// Line and Col count from 1, as compilers do. Col is 0 when the line
// gives none.
Line, Col int
Kind Kind
// Start and End are the rune range of the line that names the place,
// for the editor to colour.
Start, End int
}
Loc is a place in a file that a line of output points at.