From fcdb7114634b145f88cb45cfeb516952c207290f Mon Sep 17 00:00:00 2001 From: Evan Read Date: Fri, 9 Feb 2024 11:25:20 +1000 Subject: [PATCH] chore: Vale and Markdown rule refresh for project --- .gitlab-ci.yml | 4 +- .markdownlint-cli2.yaml | 160 ++++++++++++++++++++ .markdownlint.yml | 154 ------------------- .tool-versions | 2 +- docs/.vale/gitlab/BadgeCapitalization.yml | 14 -- docs/.vale/gitlab/HistoryItems.yml | 13 ++ docs/.vale/gitlab/LatinTerms.yml | 2 +- docs/.vale/gitlab/SubstitutionWarning.yml | 2 + docs/.vale/gitlab/Substitutions.yml | 68 +++++---- docs/.vale/gitlab/Uppercase.yml | 2 + docs/.vale/gitlab/VersionText.yml | 19 --- docs/.vale/gitlab/VersionTextSingleLine.yml | 13 -- docs/.vale/gitlab/spelling-exceptions.txt | 4 +- 13 files changed, 219 insertions(+), 238 deletions(-) create mode 100644 .markdownlint-cli2.yaml delete mode 100644 .markdownlint.yml delete mode 100644 docs/.vale/gitlab/BadgeCapitalization.yml create mode 100644 docs/.vale/gitlab/HistoryItems.yml delete mode 100644 docs/.vale/gitlab/VersionText.yml delete mode 100644 docs/.vale/gitlab/VersionTextSingleLine.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e65c2b4..781c0534 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 00000000..126af5d3 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -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" + ] diff --git a/.markdownlint.yml b/.markdownlint.yml deleted file mode 100644 index ab961e3e..00000000 --- a/.markdownlint.yml +++ /dev/null @@ -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 diff --git a/.tool-versions b/.tool-versions index 32e7b7c6..17cae9c9 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ golang 1.21.5 -vale 2.29.6 +vale 3.0.7 diff --git a/docs/.vale/gitlab/BadgeCapitalization.yml b/docs/.vale/gitlab/BadgeCapitalization.yml deleted file mode 100644 index a44bcbc0..00000000 --- a/docs/.vale/gitlab/BadgeCapitalization.yml +++ /dev/null @@ -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))?\)\*\*' diff --git a/docs/.vale/gitlab/HistoryItems.yml b/docs/.vale/gitlab/HistoryItems.yml new file mode 100644 index 00000000..72b4c1e4 --- /dev/null +++ b/docs/.vale/gitlab/HistoryItems.yml @@ -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>`]' diff --git a/docs/.vale/gitlab/LatinTerms.yml b/docs/.vale/gitlab/LatinTerms.yml index 0f098979..9fbaf278 100644 --- a/docs/.vale/gitlab/LatinTerms.yml +++ b/docs/.vale/gitlab/LatinTerms.yml @@ -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" diff --git a/docs/.vale/gitlab/SubstitutionWarning.yml b/docs/.vale/gitlab/SubstitutionWarning.yml index 07f0f9d6..8b4d3160 100644 --- a/docs/.vale/gitlab/SubstitutionWarning.yml +++ b/docs/.vale/gitlab/SubstitutionWarning.yml @@ -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" diff --git a/docs/.vale/gitlab/Substitutions.yml b/docs/.vale/gitlab/Substitutions.yml index 0d49ac58..4950e495 100644 --- a/docs/.vale/gitlab/Substitutions.yml +++ b/docs/.vale/gitlab/Substitutions.yml @@ -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 - '(? 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`]' diff --git a/docs/.vale/gitlab/VersionTextSingleLine.yml b/docs/.vale/gitlab/VersionTextSingleLine.yml deleted file mode 100644 index 552ccb99..00000000 --- a/docs/.vale/gitlab/VersionTextSingleLine.yml +++ /dev/null @@ -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}' diff --git a/docs/.vale/gitlab/spelling-exceptions.txt b/docs/.vale/gitlab/spelling-exceptions.txt index 575dc713..03b4ecaf 100644 --- a/docs/.vale/gitlab/spelling-exceptions.txt +++ b/docs/.vale/gitlab/spelling-exceptions.txt @@ -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