more detailed default stringification of diagnostics

This commit is contained in:
Martin Atkins 2017-05-16 07:22:56 -07:00
parent 66c38447d3
commit bd0cbc1c81

View File

@ -45,7 +45,7 @@ type Diagnostics []*Diagnostic
// This presents only minimal context about the error, for compatibility // This presents only minimal context about the error, for compatibility
// with usual expectations about how errors will present as strings. // with usual expectations about how errors will present as strings.
func (d *Diagnostic) Error() string { func (d *Diagnostic) Error() string {
return fmt.Sprintf("%s: %s", d.Subject.Start, d.Summary) return fmt.Sprintf("%s: %s; %s", d.Subject, d.Summary, d.Detail)
} }
// error implementation, so that sets of diagnostics can be returned via // error implementation, so that sets of diagnostics can be returned via