Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Report ¶
func Report(r Reporter, d Diagnostic)
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func (*Collector) Diagnostics ¶
func (c *Collector) Diagnostics() []Diagnostic
func (*Collector) Report ¶
func (c *Collector) Report(d Diagnostic)
type ConvertOptions ¶
type Diagnostic ¶
type Diagnostic struct {
Code string `json:"code" ub:"code"`
Severity Severity `json:"severity" ub:"severity"`
Message string `json:"message" ub:"message"`
Hint string `json:"hint,omitempty" ub:"hint,omitempty"`
Path string `json:"path,omitempty" ub:"path,omitempty"`
Span *Span `json:"span,omitempty" ub:"span,omitempty"`
}
func FromError ¶
func FromError(err error, opts ConvertOptions) []Diagnostic
func Merge ¶
func Merge(groups ...[]Diagnostic) []Diagnostic
func Normalize ¶
func Normalize(ds []Diagnostic) []Diagnostic
type PathMapper ¶
type PathMapper struct {
WorkingDir string
ProjectDir string
Mappings []PathMapping
HiddenRoots []string
}
func (PathMapper) Display ¶
func (m PathMapper) Display(path string) string
func (PathMapper) ReplaceKnownPrefixes ¶
func (m PathMapper) ReplaceKnownPrefixes(message string) string
type PathMapping ¶
type Reporter ¶
type Reporter interface {
Report(Diagnostic)
}
Click to show internal directories.
Click to hide internal directories.