You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OK, I know for special needs --output=JSON and Go-template-based output-styles (see below) exist already, but maybe this output style may still be expanded.
For example currently one gets:
README.md:72:71:write-good.Weasel:'likely' is a weasel word!
More useful would be:
README.md:72:71: [warning] write-good.Weasel: 'likely' is a weasel word!
Or for better backwards-compatibility (the message is the last part and not structured => unlikely to be parsed):
README.md:72:71:write-good.Weasel: [warning] 'likely' is a weasel word!
A workaround is indeed possible using a Go template file:
{{- /* Very much like `vale --output=line`, but with the severities too! -}}
{{- /* See also https://docs.errata.ai/vale/cli#template-examples */ -}}
{{- range .Files}}
{{- $p := .Path -}}
{{- range .Alerts -}}
{{- printf "%s:%d:%d: [%s] %s: %s" $p .Line (index .Span 0) .Severity .Check .Message }}
{{end -}}
{{end}}
Activity
[-]Add severity to `value --output line` output[/-][+]Add severity to `vale --output line` output[/+][-]Add severity to `vale --output line` output[/-][+]Add severity to `vale --output=line` output[/+]jdkato commentedon Jun 12, 2021
Using a template file isn't a "workaround" here -- it's the intended solution.