Lint for spelling, capitalization, and other typos of important vocabulary
As highlighted by the immense number of typos of just GitLab (see MRs in #147), the most important word in the handbook, we really need some automation to enforce proper spelling and capitalization of our important vocabulary.
Two examples that could be implemented on the handbook project, are the two tools the technical writers for the GitLab product docs implemented to ensure the docs follow our highest standards:
-
Markdownlint: Already in use in the handbook for markdown formatting issues, but could be used to enforce proper capitalization (
GitLab
with capitalG
andL
, notGitlab
or any other variation).markdownlint.yml
config to enforce proper capitalization in the docs. -
Vale: Can write custom rules to enforce almost anything in text. The docs team has written custom rules to enforce a wide variety of language issues, for example:
- Strict vocab rules (pipeline fails if certain terms are used incorrectly): https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Substitutions.yml
- Vocab warnings (pipeline does not fail, but a warning is shown in the MR diff): https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionWarning.yml
- Double-word typos, like "Go to the the handbook": https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Repetition.yml
- DIB language rules:
- And many more: https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc/.vale/gitlab
While it took a long time to create all these rules, the improvement in docs quality has been impressive. Considering the importance of our handbook, we should put in the work to implement linters and ensure our handbook content is as high quality as our docs content.
Rules to add to handbook
The following is a list of the product documentation rules that we'd like to introduce to the handbook.
If you'd like to contribute, please check the item in the list if you intend to work on it, and add a link to the MR when available.
markdownlint
For context, many of the rules were previously updated already to make markdownlint more consistent with product docs: https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4669 and !5738 (merged)
To make the handbook markdownlint file more consistent with the product docs markdownlint config, we should make the following changes:
-
Remove "no-multiple-blanks": false
from internal handbook. | (1411) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4858 -
Remove "ul-indent": false
| (8352) !6286 (merged) and (2088) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4851 -
Remove "heading-increment": false,
Note: true on internal handbook already. | (594) !6763 (merged) -
Optionally: Add reference-links-images: false
once https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/ReferenceLinks.yml is added -
Add no-trailing-spaces: false
. If we do this, we'll need to create a follow-up issue to implement something similar to #151 (comment 1785554020) ; also dependent on #270 (closed). | !6530 (merged) and https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4920
To consider
-
Add "fenced-code-language": false,
as we don't need to be strict about this. The main advantage is syntax highlighting which is a nice to have, but not a requirement. -
Add proper-names
withcode_blocks: false
andhtml_elements: false
, with the following names (full list copied as-is from the current version on the default branch):
proper names
-
"Akismet", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"Alertmanager", (?) (1) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"AlmaLinux", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"API", -
"Asana", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"Auth0", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"Azure", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"Bamboo", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"Bitbucket", (?) (3) -
"Bugzilla", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"CAS", (?) (1) -
"CentOS", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"Consul", (?) (3) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"Debian", (?) (1) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"DevOps", -
"Docker", -
"DockerSlim", -
"Elasticsearch", -
"Facebook", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"fastlane", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"fluent-plugin-redis-slowlog", (?) (0) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4895 -
"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", -
"YAML", -
"YouTrack"
No changes
These have been reviewed and kept as-is on purpose:
-
first-header
rules are purposely kept false since we use the title as the h1 in the handbook, so we actually prefer not having a H1. -
ol-prefix
andul-style
are left at the default, letting it be consistent rather than forcingone
anddash
. -
no-bare-urls: false
: This is currently not possible due to the shortcodes in the handbook. There's a feature request for custom regex exemption but it's still open: https://github.com/DavidAnson/markdownlint/issues/249 . The only other solution I've found is to disable the rule for all instances: https://discourse.gohugo.io/t/ignore-a-line-with-markdownlint/44269 . We can consider making an equivalent Vale rule instead.
Vale rules
Note: vale can be suggestion, warning, or error. Where not specified, use the same as what's in the docs rule.
-
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/British.yml (as warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/EOLWhitespace.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/InclusionAbleism.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/InclusionCultural.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/InclusionGender.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/InternalLinkCase.yml (error) | (57) !6600 (merged) and (2) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4896 -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/InternalLinkFormat.yml (as warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/LatinTerms.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/MeaningfulLinkWords.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/MergeConflictMarkers.yml (error) | (0) !6422 (merged) and https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4866 -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/MultiLineLinks.yml (error) | (163) !6616 (merged) and (19) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4894 -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/NonStandardQuotes.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/OxfordComma.yml (warning) -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/ReferenceLinks.yml (error) | (745) !6682 (merged) and (30) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4940 -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/RelativeLinks.yml (a version of) | (289) !6583 (merged) and (29) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4896 -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/RelativeLinksDoubleSlashes.yml | (0) !6422 (merged) and https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4866 -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Repetition.yml | (291) !6422 (merged) and (42) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4866 -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Spelling.yml (warning) ; don't forget the spelling exceptions file -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Zip.yml | (0) !6422 (merged) and (1) https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4866
Warnings added in !6707 (merged) and https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/4960.
To consider
-
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SentenceLength.yml -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SentenceSpacing.yml -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionWarning.yml -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Substitutions.yml -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Units.yml The matching isn't great though. We would need to make exceptions for things like "1st", and "3D". -
https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Uppercase.yml There are a lot of uppercase words that we'd have to add.