Practical handbook edits: Document how to remove trailing whitespaces (IDE, CLI, bulk)
Why is this change being made?
The internal and new public handbooks have CI/CD linters that check for trailing whitespaces. With the CI/CD pipelines being run after editing and creating the Merge Requests, this causes extra work when analyzing why the pipelines failed. This problem is tracked in https://gitlab.com/internal-handbook/internal-handbook.gitlab.io/-/issues/72 and gitlab-com/content-sites/handbook#86 (closed)
The first step to help team members is to document how to remove trailing whitespaces and reduce the MR fix and review time. This MR adds a section into the practical handbook edits handbook which explains how to remove trailing whitespaces. There are intentionally only a few examples shown, and not all IDEs and editors explained (they have separated handbook pages).
- VS Code - UI fixes
- vim - terminal fixes
Additionally, this MR adds a command line with find/sed to replace trailing whitespaces in bulk with one command. This can be helpful when multiple files are affected by the CI/CD markdownlint runs.
Example of a failing pipeline
content/handbook/marketing/developer-relations-and-community/_index.md:78:70 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
After merging this MR, we can update the CI/CD linter jobs to link to the new handbook documentation, and ensure that everyone can fix pipelines fast.
Author Checklist
-
Provided a concise title for this Merge Request (MR) -
Added a description to this MR explaining the reasons for the proposed change, per say why, not just what - Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added, and the content is SAFE
-
Assign reviewers for this MR to the correct Directly Responsible Individual/s (DRI) - If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
Maintained by
section on the page being edited - If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies
- The when to get approval handbook section explains the workflow in more detail
- If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
-
If the changes affect team members, or warrant an announcement in another way, please consider posting an update in #whats-happening-at-gitlab linking to this MR - If this is a change that directly impacts the majority of global team members, it should be a candidate for #company-fyi. Please work with internal communications and check the handbook for examples.
/cc @jamiemaynard @marshall007 @streas