Documentation ¶
Overview ¶
Package diagnostics provides utilities to collect diagnostics for lint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { Errors errors.MultiError // contains filtered or unexported fields }
Result contains diagnostic messages from lint.
func (*Result) AppendError ¶
AppendError appends an error to result, prefixed with current context.
func (*Result) IsValid ¶
IsValid returns false if the result contains any validation errors, true otherwise.
func (*Result) Merge ¶
Merge merges another result into the current result.
Diagnostic messages from the incoming Result are prefixed with the current Result's context. Context from the incoming Result is ignored.
func (*Result) PushContext ¶
PushContext adds context to be prepended to all diagnostic messages.
Contexts can be stacked by calling PushContext() repeatedly. Returns a function to pop the pushed context.