Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/.vale
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-20 11:43:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-20 11:43:02 +0300
commitd9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch)
tree2341ef426af70ad1e289c38036737e04b0aa5007 /doc/.vale
parentd6e514dd13db8947884cd58fe2a9c2a063400a9b (diff)
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'doc/.vale')
-rw-r--r--doc/.vale/gitlab/Acronyms.yml12
-rw-r--r--doc/.vale/gitlab/UnclearAntecedent.yml6
-rw-r--r--doc/.vale/vale-json.tmpl58
3 files changed, 73 insertions, 3 deletions
diff --git a/doc/.vale/gitlab/Acronyms.yml b/doc/.vale/gitlab/Acronyms.yml
index 122cac6f8a1..b75f81dd075 100644
--- a/doc/.vale/gitlab/Acronyms.yml
+++ b/doc/.vale/gitlab/Acronyms.yml
@@ -17,6 +17,7 @@ exceptions:
- AJAX
- ANSI
- API
+ - APM
- ARM
- ARN
- ASCII
@@ -24,6 +25,7 @@ exceptions:
- BSD
- CAS
- CDN
+ - CIDR
- CLI
- CNA
- CNAME
@@ -41,11 +43,13 @@ exceptions:
- DNS
- DOM
- DSA
+ - DSL
- DVCS
- ECDSA
- ECS
- EFS
- EKS
+ - ELB
- EOL
- EXIF
- FAQ
@@ -59,6 +63,7 @@ exceptions:
- GDK
- GDPR
- GET
+ - GID
- GIF
- GKE
- GNU
@@ -94,6 +99,7 @@ exceptions:
- LESS
- LFS
- LRU
+ - LTM
- LTS
- MIME
- MIT
@@ -115,6 +121,8 @@ exceptions:
- PEM
- PEP
- PGP
+ - PID
+ - PKCS
- PHP
- PNG
- POSIX
@@ -124,6 +132,7 @@ exceptions:
- RAM
- RBAC
- RDP
+ - RDS
- REST
- RFC
- RHEL
@@ -135,6 +144,7 @@ exceptions:
- RVM
- SAAS
- SAML
+ - SAN
- SAST
- SATA
- SCIM
@@ -168,7 +178,9 @@ exceptions:
- TODO
- TOML
- TTL
+ - UID
- UDP
+ - UID
- UNIX
- URI
- URL
diff --git a/doc/.vale/gitlab/UnclearAntecedent.yml b/doc/.vale/gitlab/UnclearAntecedent.yml
index 863bbd4e109..5f238598d9f 100644
--- a/doc/.vale/gitlab/UnclearAntecedent.yml
+++ b/doc/.vale/gitlab/UnclearAntecedent.yml
@@ -1,13 +1,13 @@
---
-# Suggestion: gitlab.UnclearAntecedent
+# Warning: gitlab.UnclearAntecedent
#
# Checks for words that need a noun for clarity.
#
-# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles
+# For a list of all options, see https://docs.errata.ai/vale/styles
extends: existence
message: "'%s' is not precise. Try rewriting with a specific subject and verb."
link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#this-these-that-those
-level: suggestion
+level: warning
ignorecase: false
tokens:
- 'That is'
diff --git a/doc/.vale/vale-json.tmpl b/doc/.vale/vale-json.tmpl
new file mode 100644
index 00000000000..ed3c3259df3
--- /dev/null
+++ b/doc/.vale/vale-json.tmpl
@@ -0,0 +1,58 @@
+{{- /* Modify Vale's output https://docs.errata.ai/vale/cli#--output */ -}}
+
+{{- /* Keep track of our various counts */ -}}
+
+{{- $e := 0 -}}
+{{- $w := 0 -}}
+{{- $s := 0 -}}
+{{- $f := 0 -}}
+
+{{- /* Range over the linted files */ -}}
+
+{{- range .Files}}
+
+{{- $f = add1 $f -}}
+{{- $path := .Path -}}
+
+{{- /* Range over the file's alerts */ -}}
+[
+
+{{- range $idx, $a := .Alerts -}}
+
+{{- $error := "" -}}
+{{- if eq .Severity "error" -}}
+ {{- $error = .Severity -}}
+ {{- $e = add1 $e -}}
+{{- else if eq .Severity "warning" -}}
+ {{- $error = .Severity -}}
+ {{- $w = add1 $w -}}
+{{- else -}}
+ {{- $error = .Severity -}}
+ {{- $s = add1 $s -}}
+{{- end}}
+
+{{- /* Variables setup */ -}}
+
+{{- $path = $path -}}
+{{- $loc := printf "%d" .Line -}}
+{{- $check := printf "%s" .Check -}}
+{{- $message := printf "%s" .Message -}}
+{{- $link := printf "%s" .Link -}}
+{{- if $idx -}},{{- end -}}
+
+{{- /* Output */ -}}
+
+ {
+ "description": "{{ $message }}",
+ "fingerprint": "{{ $path }}-{{ $loc }}",
+ "severity": "{{ $error }}",
+ "location": {
+ "path": "{{ $path }}",
+ "lines": {
+ "begin": {{ $loc }}
+ }
+ }
+ }
+{{end -}}
+{{end -}}
+]