Fully implement markdownlint-cli2 in project

This commit is contained in:
Evan Read 2024-02-02 14:34:04 +10:00
parent 3a456e4b97
commit a1d1514647
8 changed files with 173 additions and 163 deletions

162
.markdownlint-cli2.yaml Normal file
View File

@ -0,0 +1,162 @@
---
# Base Markdownlint configuration
# Extended Markdownlint configuration in doc/.markdownlint/
# 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,153 +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: false
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 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",
"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

@ -0,0 +1,7 @@
---
# Extended Markdown configuration to enforce no-trailing-spaces rule
# To use this configuration, in the project directory run:
# markdownlint-cli2 --config doc/.markdownlint/.markdownlint-cli2.yaml 'doc/**/*.md'
config:
extends: "../../.markdownlint-cli2.yaml"
no-trailing-spaces: true

View File

@ -1,6 +0,0 @@
---
# Extended Markdown configuration to enforce no-trailing-spaces rule
# To use this configuration, in doc directory run:
# markdownlint-cli2-config .markdownlint/.markdownlint.yml '**/*.md'
extends: "../../.markdownlint.yml"
no-trailing-spaces: true

View File

@ -30,7 +30,7 @@ that do not contain changes to bundled components.
|Release Type|Example Pipelines|`build_iteration` String|
|-|-|-|
|non-tagged|feature branches, nightly builds|`0`|
|tagged|releases|`(ce|ee).<OMNIBUS_RELEASE>`|
|tagged|releases|`ce.<OMNIBUS_RELEASE>` or `ee.<OMNIBUS_RELEASE>` |
The edition component, **ce** or **ee**, instructs package managers such as
`apt` or `yum` to treat Enteprise Edition packages as an upgrade from

View File

@ -801,7 +801,7 @@ The available options are:
| `gitlab_rails['db_extra_config_command']` | Provides extra configuration to the DB configuration file used by GitLab Rails application. (`database.yml`) |
| `gitlab_kas['extra_config_command']` | Provides extra configuration to GitLab agent server for Kubernetes (KAS). |
| `gitlab_workhorse['extra_config_command']` | Provides extra configuration to GitLab Workhorse.|
| `gitlab_exporter['extra_config_command']` | Provides extra configuration to GitLab Exporter.
| `gitlab_exporter['extra_config_command']` | Provides extra configuration to GitLab Exporter. |
The value assigned to any of these options should be an absolute path to an executable script
that writes the sensitive configuration in the required format to STDOUT. The

View File

@ -67,7 +67,7 @@ The following GitLab settings correspond to DNS entries.
| `external_url` | This URL interacts with the main GitLab instance. It's used when cloning over SSH/HTTP/HTTPS and when accessing the web UI. GitLab Runner uses this URL to communicate with the instance. | [Configure the `external_url`](configuration.md#configure-the-external-url-for-gitlab). |
| `registry_external_url` | This URL is used to interact with the [Container Registry](https://docs.gitlab.com/ee/user/packages/container_registry/). It can be used by the Let's Encrypt integration. This URL can also use the same DNS entry as `external_url` but on a different port. | [Configure the `registry_external_url`](https://docs.gitlab.com/ee/administration/packages/container_registry.html#container-registry-domain-configuration). |
| `mattermost_external_url` | This URL is used for the [bundled Mattermost](https://docs.gitlab.com/ee/integration/mattermost/) software. It can be used by the Let's Encrypt integration. | [Configure the `mattermost_external_url`](https://docs.gitlab.com/ee/integration/mattermost/#getting-started). |
| `pages_external_url` | By default, projects that use [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/) deploy to a sub-domain of this value. | [Configure the `pages_external_url`](https://docs.gitlab.com/ee/administration/pages/#configuration).
| `pages_external_url` | By default, projects that use [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/) deploy to a sub-domain of this value. | [Configure the `pages_external_url`](https://docs.gitlab.com/ee/administration/pages/#configuration). |
| Auto DevOps domain | If you use Auto DevOps to deploy projects, this domain can be used to deploy software. It can be defined at an instance, or cluster level. This is configured using the GitLab UI, and not in `/etc/gitlab/gitlab.rb`. | [Configure the Auto DevOps domain](https://docs.gitlab.com/ee/topics/autodevops/requirements.html#auto-devops-base-domain). |
## Troubleshooting

View File

@ -317,7 +317,7 @@ docs-lint markdown:
# Lint prose
- vale --minAlertLevel error doc
# Lint Markdown
- markdownlint-cli2-config .markdownlint.yml 'doc/**/*.md'
- markdownlint-cli2 'doc/**/*.md'
rules:
- if: '$PIPELINE_TYPE =~ /_TEST_PIPELINE$/'
- if: '$PIPELINE_TYPE =~ /_MR_PIPELINE$/'