From a1d1514647ad6bf325977d50902464fb3584041b Mon Sep 17 00:00:00 2001 From: Evan Read Date: Fri, 2 Feb 2024 14:34:04 +1000 Subject: [PATCH] Fully implement markdownlint-cli2 in project --- .markdownlint-cli2.yaml | 162 ++++++++++++++++++++++ .markdownlint.yml | 153 -------------------- doc/.markdownlint/.markdownlint-cli2.yaml | 7 + doc/.markdownlint/.markdownlint.yml | 6 - doc/development/package_version_format.md | 2 +- doc/settings/configuration.md | 2 +- doc/settings/dns.md | 2 +- gitlab-ci-config/gitlab-com.yml | 2 +- 8 files changed, 173 insertions(+), 163 deletions(-) create mode 100644 .markdownlint-cli2.yaml delete mode 100644 .markdownlint.yml create mode 100644 doc/.markdownlint/.markdownlint-cli2.yaml delete mode 100644 doc/.markdownlint/.markdownlint.yml diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 000000000..4ad91e054 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -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" + ] diff --git a/.markdownlint.yml b/.markdownlint.yml deleted file mode 100644 index 641f45fd7..000000000 --- a/.markdownlint.yml +++ /dev/null @@ -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 diff --git a/doc/.markdownlint/.markdownlint-cli2.yaml b/doc/.markdownlint/.markdownlint-cli2.yaml new file mode 100644 index 000000000..253767d8e --- /dev/null +++ b/doc/.markdownlint/.markdownlint-cli2.yaml @@ -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 diff --git a/doc/.markdownlint/.markdownlint.yml b/doc/.markdownlint/.markdownlint.yml deleted file mode 100644 index 80ea433f3..000000000 --- a/doc/.markdownlint/.markdownlint.yml +++ /dev/null @@ -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 diff --git a/doc/development/package_version_format.md b/doc/development/package_version_format.md index 5db613a22..2273804f0 100644 --- a/doc/development/package_version_format.md +++ b/doc/development/package_version_format.md @@ -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).`| +|tagged|releases|`ce.` or `ee.` | The edition component, **ce** or **ee**, instructs package managers such as `apt` or `yum` to treat Enteprise Edition packages as an upgrade from diff --git a/doc/settings/configuration.md b/doc/settings/configuration.md index 8c5e5a706..545aff625 100644 --- a/doc/settings/configuration.md +++ b/doc/settings/configuration.md @@ -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 diff --git a/doc/settings/dns.md b/doc/settings/dns.md index 12269280c..97cdeeb32 100644 --- a/doc/settings/dns.md +++ b/doc/settings/dns.md @@ -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 diff --git a/gitlab-ci-config/gitlab-com.yml b/gitlab-ci-config/gitlab-com.yml index e08a5d65f..083b2a455 100644 --- a/gitlab-ci-config/gitlab-com.yml +++ b/gitlab-ci-config/gitlab-com.yml @@ -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$/'