Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Diagnostic ¶
type Diagnostic struct {
File string `json:"file"`
Line int `json:"line"`
Col int `json:"col"`
Code string `json:"code,omitempty"`
Severity string `json:"severity"` // error|warning|info
Message string `json:"message"`
Tool string `json:"tool"` // gopls|tsc
Language string `json:"language"` // go|typescript
}
Diagnostic represents a single compiler/language diagnostic.
func ParseDiagnostics ¶
func ParseDiagnostics(output string) []Diagnostic
ParseDiagnostics attempts to parse output from gopls check and tsc --noEmit into structured diagnostics. It is resilient to slight format variations.
Click to show internal directories.
Click to hide internal directories.