Sort Validation warning and errors
Make the UI output consistent
This commit is contained in:
parent
a2d78b62aa
commit
3e0af2abbb
|
@ -665,6 +665,12 @@ func (c *Context) Validate() ([]string, []error) {
|
||||||
|
|
||||||
// Return the result
|
// Return the result
|
||||||
rerrs := multierror.Append(errs, walker.ValidationErrors...)
|
rerrs := multierror.Append(errs, walker.ValidationErrors...)
|
||||||
|
|
||||||
|
sort.Strings(walker.ValidationWarnings)
|
||||||
|
sort.Slice(rerrs.Errors, func(i, j int) bool {
|
||||||
|
return rerrs.Errors[i].Error() < rerrs.Errors[j].Error()
|
||||||
|
})
|
||||||
|
|
||||||
return walker.ValidationWarnings, rerrs.Errors
|
return walker.ValidationWarnings, rerrs.Errors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue