Vale test for single-item version text with incorrectly used hyphens
Problem to solve
Incorrect use of https://docs.gitlab.com/ee/development/documentation/versions.html#add-a-version-history-item shows up in our documentation; create a regex that looks for incorrectly used hyphen in > -
.
Proposed Vale rule:
---
# Error: gitlab.SingleLineVersionNotes
#
# Verifies that single-item version notes don't have a hyphen.
#
# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles
extends: existence
message: 'Version text with only a single item must not start with a hyphen.'
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}'
Further details
With this test implemented, these notes are correct:
> Notifications for expiring tokens [introduced](<link-to-issue>) in GitLab 11.3.
> - Notifications for expiring tokens [introduced](<link-to-issue>) in GitLab 11.3.
> - Creating an issue from an issue board [introduced](<link-to-issue>) in GitLab 13.1.
And this note is incorrect if on its own:
> - Notifications for expiring tokens [introduced](<link-to-issue>) in GitLab 11.3.
Proposal
Who can address the issue
Other links/references
Edited by Marcin Sedlak-Jakubowski