chore: Vale and Markdown rule refresh for project

This commit is contained in:
Evan Read 2024-02-09 11:25:20 +10:00
parent 70ce59dcec
commit fcdb711463
13 changed files with 219 additions and 238 deletions

View File

@ -63,13 +63,13 @@ check_docs_update:
fi
check_docs_markdown:
image: registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.18-vale-2.29.6-markdownlint-0.37.0-markdownlint2-0.10.0
image: registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.19-vale-3.0.7-markdownlint-0.39.0-markdownlint2-0.12.1
extends: .documentation
script:
# Lint prose
- vale --minAlertLevel error docs *.md
# Lint Markdown
- markdownlint --config .markdownlint.yml 'docs/**/*.md' *.md
- markdownlint-cli2 'docs/**/*.md' *.md
lint_commit:
stage: test

160
.markdownlint-cli2.yaml Normal file
View File

@ -0,0 +1,160 @@
---
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for explanations of each rule
config:
# First, set the default
default: true
# Per-rule settings in alphabetical order
code-block-style: # MD046
style: "fenced"
emphasis-style: false # MD049
first-header-h1: true # MD002
first-line-h1: false # MD041
header-style: # MD003
style: "atx"
hr-style: # MD035
style: "---"
line-length: false # MD013
link-fragments: false # MD051
no-duplicate-heading: # MD024
siblings_only: true
no-emphasis-as-heading: false # MD036
no-inline-html: false # MD033
no-trailing-punctuation: # MD026
punctuation: ".,;:!。,;:!?"
no-trailing-spaces: false # MD009
ol-prefix: # MD029
style: "one"
reference-links-images: false # MD052
ul-style: # MD004
style: "dash"
# Keep this item last due to length
proper-names: # MD044
code_blocks: false
html_elements: false
names: [
"Akismet",
"Alertmanager",
"AlmaLinux",
"API",
"Asana",
"Auth0",
"Azure",
"Bamboo",
"Bitbucket",
"Bugzilla",
"CAS",
"CentOS",
"Consul",
"Debian",
"DevOps",
"Docker",
"DockerSlim",
"Elasticsearch",
"Facebook",
"fastlane",
"fluent-plugin-redis-slowlog",
"GDK",
"Geo",
"Git LFS",
"git-annex",
"git-credential-oauth",
"git-sizer",
"Git",
"Gitaly",
"GitHub",
"gitlab.vim",
"GitLab Geo",
"GitLab Monitor",
"GitLab Operator",
"GitLab Pages",
"GitLab Rails",
"GitLab Runner",
"GitLab Shell",
"GitLab Workhorse",
"GitLab",
"Gitleaks",
"Gmail",
"Google",
"Grafana",
"Gzip",
"Helm",
"HipChat",
"ID",
"IP",
"Ingress",
"jasmine-jquery",
"JavaScript",
"Jaeger",
"Jenkins",
"Jira",
"Jira Cloud",
"Jira Server",
"jQuery",
"JSON",
"JupyterHub",
"Karma",
"Kerberos",
"Knative",
"Kubernetes",
"LDAP",
"Let's Encrypt",
"Markdown",
"markdownlint",
"Mattermost",
"Microsoft",
"minikube",
"MinIO",
"ModSecurity",
"Neovim",
"NGINX Ingress",
"NGINX",
"OAuth",
"OAuth 2",
"OmniAuth",
"OpenID",
"OpenShift",
"PgBouncer",
"Postfix",
"PostgreSQL",
"PowerShell",
"Praefect",
"Prometheus",
"Puma",
"puma-worker-killer",
"Python",
"Rake",
"Redis",
"Redmine",
"reCAPTCHA",
"Ruby",
"runit",
"Salesforce",
"SAML",
"Sendmail",
"Sentry",
"Service Desk",
"Sidekiq",
"Shibboleth",
"Slack",
"SMTP",
"SpotBugs",
"SSH",
"Tiller",
"TOML",
"Trello",
"Trello Power-Ups",
"TypeScript",
"Twitter",
"Ubuntu",
"Ultra Auth",
"Unicorn",
"unicorn-worker-killer",
"URL",
"WebdriverIO",
"Workload Identity Pool",
"Workload Identity Provider",
"YAML",
"YouTrack"
]

View File

@ -1,154 +0,0 @@
---
# Base Markdownlint configuration
# Extended Markdownlint configuration in doc/.markdownlint/
default: true
first-header-h1: true
header-style:
style: "atx"
ul-style:
style: "dash"
no-trailing-spaces: false
line-length: false
no-duplicate-header:
allow_different_nesting: true
no-trailing-punctuation:
punctuation: ".,;:!。,;:!?"
ol-prefix:
style: "one"
no-inline-html: false
hr-style:
style: "---"
no-emphasis-as-heading: false
first-line-h1: false
code-block-style:
style: "fenced"
emphasis-style: false
link-fragments: true
reference-links-images: false
proper-names:
names: [
"Akismet",
"Alertmanager",
"AlmaLinux",
"API",
"Asana",
"Auth0",
"Azure",
"Bamboo",
"Bitbucket",
"Bugzilla",
"CAS",
"CentOS",
"Consul",
"Debian",
"DevOps",
"Docker",
"DockerSlim",
"Elasticsearch",
"Facebook",
"fastlane",
"fluent-plugin-redis-slowlog",
"GDK",
"Geo",
"Git LFS",
"git-annex",
"git-credential-oauth",
"git-sizer",
"Git",
"Gitaly",
"GitHub",
"gitlab.vim",
"GitLab Geo",
"GitLab Monitor",
"GitLab Operator",
"GitLab Pages",
"GitLab Rails",
"GitLab Runner",
"GitLab Shell",
"GitLab Workhorse",
"GitLab",
"Gitleaks",
"Gmail",
"Google",
"Grafana",
"Gzip",
"Helm",
"HipChat",
"ID",
"Ingress",
"jasmine-jquery",
"JavaScript",
"Jaeger",
"Jenkins",
"Jira",
"Jira Cloud",
"Jira Server",
"jQuery",
"JSON",
"JupyterHub",
"Karma",
"Kerberos",
"Knative",
"Kubernetes",
"LDAP",
"Let's Encrypt",
"Markdown",
"markdownlint",
"Mattermost",
"Microsoft",
"minikube",
"MinIO",
"ModSecurity",
"Neovim",
"NGINX Ingress",
"NGINX",
"OAuth",
"OAuth 2",
"OmniAuth",
"OpenID",
"OpenShift",
"PgBouncer",
"Postfix",
"PostgreSQL",
"PowerShell",
"Praefect",
"Prometheus",
"Puma",
"puma-worker-killer",
"Python",
"Rake",
"Redis",
"Redmine",
"reCAPTCHA",
"Ruby",
"runit",
"Salesforce",
"SAML",
"Sendmail",
"Sentry",
"Service Desk",
"Sidekiq",
"Shibboleth",
"Slack",
"SMTP",
"SpotBugs",
"SSH",
"Tiller",
"TOML",
"Trello",
"Trello Power-Ups",
"TypeScript",
"Twitter",
"Ubuntu",
"Ultra Auth",
"Unicorn",
"unicorn-worker-killer",
"URL",
"WebdriverIO",
"Workload Identity Pool",
"Workload Identity Provider",
"YAML",
"YouTrack"
]
code_blocks: false
html_elements: false

View File

@ -1,2 +1,2 @@
golang 1.21.5
vale 2.29.6
vale 3.0.7

View File

@ -1,14 +0,0 @@
---
# Error: gitlab.BadgeCapitalization
#
# Verifies that badges are not mixed case, which won't render properly.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: existence
message: "Capitalize the '%s' badge."
link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#product-tier-badges
level: error
scope: raw
raw:
- '(?!\*\*\((FREE|PREMIUM|ULTIMATE)( (SELF|SAAS|ALL) (BETA|EXPERIMENT))?\)\*\*)'
- '(?i)\*\*\((free|premium|ultimate)( (self|saas|all) (beta|experiment))?\)\*\*'

View File

@ -0,0 +1,13 @@
---
# Warning: gitlab.HistoryItems
#
# Ensures history items are properly formatted.
#
extends: existence
message: "History items must always start with '> -', one item per line, even if there is only one item."
link: https://docs.gitlab.com/ee/development/documentation/versions.html#add-a-version-history-item
level: error
scope: raw
raw:
- '(?m)(?<=^#+[^\n]*\n\n)> [^-]|'
- '^> - [^\n]*\n[^\n>`]'

View File

@ -15,4 +15,4 @@ swap:
e\. g\.: for example
i\.e\.: that is
i\. e\.: that is
via: "Use 'with', 'through', or 'by using' instead."
via: "with', 'through', or 'by using"

View File

@ -30,12 +30,14 @@ swap:
ex: "for example"
file name: "filename"
filesystem: "file system"
fullscreen: "full screen"
info: "information"
installation from source: self-compiled installation
installations from source: self-compiled installations
it is recommended: "you should"
logged in user: "authenticated user"
logged-in user: "authenticated user"
machine-learning: "machine learning"
modal dialog: "dialog"
modal window: "dialog"
modal: "dialog"

View File

@ -7,49 +7,35 @@
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: substitution
message: "Use '%s' instead of '%s'."
link: https://about.gitlab.com/handbook/communication/#top-misused-terms
link: https://handbook.gitlab.com/handbook/communication/top-misused-terms/
level: error
ignorecase: true
swap:
codequality: code quality
Customer [Pp]ortal: Customers Portal
disallow: prevent
'(?<!GitLab )Duo': GitLab Duo
frontmatter: front matter
GitLabber: GitLab team member
GitLabbers: GitLab team members
GitLab-shell: GitLab Shell
gitlab omnibus: Linux package
param: parameter
params: parameters
pg: PostgreSQL
'postgres$': PostgreSQL
golang: Go
raketask: Rake task
raketasks: Rake tasks
rspec: RSpec
self hosted: self-managed
self-hosted: self-managed
styleguide: style guide
to login: to log in
can login: can log in
to log-in: to log in
can log-in: can log in
to signin: to sign in
can signin: can sign in
to sign-in: to sign in
can sign-in: can sign in
x509: X.509
yml: YAML
admin user: administrator
admin users: administrators
administrator permission: administrator access
administrator permissions: administrator access
administrator role: administrator access
the administrator access level: administrator access
at least the Owner role: the Owner role
can login: can log in
can log-in: can log in
can signin: can sign in
can sign-in: can sign in
codequality: code quality
Customer [Pp]ortal: Customers Portal
developer access: the Developer role
developer permission: the Developer role
developer permissions: the Developer role
disallow: prevent
'(?<!GitLab )Duo': GitLab Duo
frontmatter: front matter
GitLab self hosted: GitLab self-managed # https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#gitlab-self-managed
GitLab self-hosted: GitLab self-managed # https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#gitlab-self-managed
GitLabber: GitLab team member
GitLabbers: GitLab team members
GitLab-shell: GitLab Shell
gitlab omnibus: Linux package
golang: Go
guest access: the Guest role
guest permission: the Guest role
guest permissions: the Guest role
@ -59,7 +45,23 @@ swap:
owner access: the Owner role
owner permission: the Owner role
owner permissions: the Owner role
param: parameter
params: parameters
pg: PostgreSQL
'postgres$': PostgreSQL
raketask: Rake task
raketasks: Rake tasks
rspec: RSpec
reporter access: the Reporter role
reporter permission: the Reporter role
reporter permissions: the Reporter role
at least the Owner role: the Owner role
self hosted GitLab: GitLab self-managed # https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#gitlab-self-managed
self-hosted GitLab: GitLab self-managed # https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#gitlab-self-managed
styleguide: style guide
the administrator access level: administrator access
to login: to log in
to log-in: to log in
to signin: to sign in
to sign-in: to sign in
x509: X.509
yml: YAML

View File

@ -64,6 +64,8 @@ exceptions:
- DORA
- DSA
- DSL
- DUOPRO
- DUOENT
- DVCS
- DVD
- EBS

View File

@ -1,19 +0,0 @@
---
# Error: gitlab.VersionText
#
# Checks that multi-line version text is formatted correctly.
#
# Specifically, looks for multi-line version text that doesn't use `-` to make it a list.
# For example:
#
# - `> Introduced in GitLab 14.0.
# - `> Removed in GitLab 15.0.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: existence
message: "Start each entry with `> -`. Keep long entries on one line."
link: https://docs.gitlab.com/ee/development/documentation/versions.html
level: error
scope: raw
raw:
- '\n#.*\n\n> [^-].+\n[^\n`]'

View File

@ -1,13 +0,0 @@
---
# Error: gitlab.VersionTextSingleLine
#
# Verifies that single-item version notes don't have a hyphen.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: existence
message: "Do not use a hyphen '-' in version text if there is only a single item."
link: https://docs.gitlab.com/ee/development/documentation/versions.html#add-a-version-history-item
level: error
scope: raw
raw:
- '(\r|\n|\r\n){2}(> - .*)(\r|\n|\r\n){2}'

View File

@ -177,6 +177,7 @@ Codecov
codenames
Codepen
CodeSandbox
Codey
Cognito
Coinbase
colocate
@ -283,6 +284,7 @@ devfiles
DevOps
Dhall
dialogs
Diffblue
disambiguates
discoverability
dismissable
@ -372,6 +374,7 @@ Flycheck
focusable
Forgerock
formatters
Fortanix
Fortinet
FQDNs
FreshBooks
@ -883,7 +886,6 @@ sharded
sharding
SHAs
shfmt
Shimo
Shippo
Shopify
Sidekiq