Create Vale test for hard link to master branch
Problem to solve
Stemming from https://gitlab.com/charts/gitlab/merge_requests/678 and gitlab-org/charts/gitlab#1148, a second look at the
doc/ dir shows many links are not relative throughout our documentation. We should ensure that all of these are made relative to properly support versioning documentation with docs.gitlab.com, and consider if a vale test is an appropriate way to alert users to fix a link.
- To search for links that are potentially problematic, use
grep -Rn 'gitlab.com/charts/gitlab/.*/master' doc/.
- I'm not currently clear about which directories are NOT problematic, but from reading the comments in gitlab-org/charts/gitlab#1148 not all directories are problems.
From this comment it may be possible to build a Vale test that looks for links matching the correct string + wildcard, but more information and testing are needed:
extends: existence message: "This link should point to a version, not 'master': '%s'" ignorecase: true nonword: true scope: link level: error raw: - 'gitlab.com/charts/gitlab/.*/master'
Who can address the issue
Someone on the Technical Writing team.