Vale CMS Need more than a rule playground? Explore
Asset Explorer

summary

A Markdown summary with a table per file and the totals, for a pull request comment or a job summary.

template cigithub Source

Getting started

Save the file as config/templates/summary.tmpl under your StylesPath, then:

vale --output=summary.tmpl .

summary.tmpl

An output format, named with --output.
{{- /* A Markdown summary, for a pull request comment or a job summary:
       a table per file, then the totals. */ -}}
{{- $e := 0 -}}{{- $w := 0 -}}{{- $s := 0 -}}
{{- range .Files -}}
### `{{ .Path }}`

| Line | Level | Rule | Message |
| ---: | ----- | ---- | ------- |
{{ range .Alerts -}}
{{- if eq .Severity "error" -}}{{- $e = add1 $e -}}
{{- else if eq .Severity "warning" -}}{{- $w = add1 $w -}}
{{- else -}}{{- $s = add1 $s -}}{{- end -}}
| {{ .Line }}:{{ index .Span 0 }} | {{ .Severity }} | `{{ .Check }}` | {{ .Message }} |
{{ end }}
{{ end -}}
**{{ $e }} {{ $e | int | plural "error" "errors" }}, {{ $w }} {{ $w | int | plural "warning" "warnings" }}, {{ $s }} {{ $s | int | plural "suggestion" "suggestions" }}.**