Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WarningsOnly []string
Functions ¶
This section is empty.
Types ¶
type LintRuleError ¶
func NewLintRuleError ¶
func NewLintRuleError(id, objectID, module string, value any, template string, a ...any) *LintRuleError
func (*LintRuleError) EqualsTo ¶
func (l *LintRuleError) EqualsTo(candidate *LintRuleError) bool
type LintRuleErrorsList ¶
type LintRuleErrorsList struct {
// contains filtered or unexported fields
}
func (*LintRuleErrorsList) Add ¶
func (l *LintRuleErrorsList) Add(e *LintRuleError)
Add adds new error to the list if it doesn't exist yet. It first checks if error is empty (i.e. all its fields are empty strings) and then checks if error with the same ID, ObjectId and Text already exists in the list.
func (*LintRuleErrorsList) ConvertToError ¶
func (l *LintRuleErrorsList) ConvertToError() error
ConvertToError converts LintRuleErrorsList to a single error. It returns an error that contains all errors from the list with a nice formatting. If the list is empty, it returns nil.
func (*LintRuleErrorsList) Critical ¶
func (l *LintRuleErrorsList) Critical() bool
func (*LintRuleErrorsList) Merge ¶
func (l *LintRuleErrorsList) Merge(e LintRuleErrorsList)
Merge merges another LintRuleErrorsList into current one, removing all duplicate errors.
Click to show internal directories.
Click to hide internal directories.