diff --git a/internal/lint/dita.go b/internal/lint/dita.go index 124aa658..475966bf 100644 --- a/internal/lint/dita.go +++ b/internal/lint/dita.go @@ -42,6 +42,11 @@ func (l *Linter) lintDITA(file *core.File) error { cmd.Stderr = &out if err = cmd.Run(); err != nil { + // dita's own diagnostics are far more useful than the exit status, + // but it doesn't always write any + if msg := strings.TrimSpace(out.String()); msg != "" { + return core.NewE100(file.Path, errors.New(msg)) + } return core.NewE100(file.Path, err) }