Skip to content

Commit 69df9e7

Browse files
authored
[Hyperlint] Vale fixes + enable link checks for PRs (cloudflare#22415)
1 parent fd304f4 commit 69df9e7

File tree

13 files changed

+89
-26
lines changed

13 files changed

+89
-26
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: gitlab_base.EOLWhitespace
3+
description: |
4+
Checks that there is no useless whitespace at the end of lines.
5+
extends: existence
6+
message: "Remove whitespace characters from the end of the line. Only remove the whitespace and nothing else."
7+
link: https://docs.gitlab.com/development/documentation/styleguide/
8+
vocab: false
9+
level: warning
10+
scope: raw
11+
raw:
12+
- ' +\n'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
extends: existence
2+
message: "Do not use exclamation points in text. Only replace the exclamation point and no other text."
3+
link: "https://developers.google.com/style/exclamation-points"
4+
nonword: true
5+
level: error
6+
action:
7+
name: edit
8+
params:
9+
- trim_right
10+
- "!"
11+
tokens:
12+
- '\w+!(?:\s|$)'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: gitlab_base.HeadingLink
3+
description: |
4+
Do not include links in a heading.
5+
Headings already have self-referencing anchor links.
6+
extends: existence
7+
message: "Do not use links in headings. Only update the links and nothing else."
8+
vocab: false
9+
level: error
10+
ignorecase: true
11+
nonword: true
12+
link: https://docs.gitlab.com/development/documentation/styleguide/#links
13+
scope: raw
14+
tokens:
15+
- ^#+ .*\[.+\]\(\S+\).*$
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
extends: existence
2+
message: "Don't use end punctuation in headings. Only update the punctuation and nothing else."
3+
link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods
4+
nonword: true
5+
level: warning
6+
scope: heading
7+
action:
8+
name: edit
9+
params:
10+
- trim_right
11+
- ".?!"
12+
tokens:
13+
- "[a-z][.?!]$"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
# Warning: cloudflare.NonStandardQuotes
3+
#
4+
# Use only standard single and double quotes, not left or right quotes.
5+
#
6+
# For a list of all options, see https://vale.sh/docs/topics/styles/
7+
extends: existence
8+
message: "Use standard single quotes or double quotes only. Do not use left or right quotes. Only update the quotes and nothing else. Double quotes are fine, so long as they aren't directional."
9+
level: warning
10+
ignorecase: true
11+
link: https://developers.cloudflare.com/style-guide/grammar/punctuation-marks-and-symbols/quotation-marks/
12+
scope: raw
13+
raw:
14+
- "[‘’“”]"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: gitlab_base.UnclearAntecedent
3+
description: |
4+
Checks for words that need a noun for clarity.
5+
extends: existence
6+
message: "Instead of '%s', try starting this sentence with a specific subject and verb. Only update this part of the sentence and nothing else."
7+
link: https://docs.gitlab.com/development/documentation/styleguide/word_list/#this-these-that-those
8+
vocab: false
9+
level: warning
10+
ignorecase: false
11+
tokens:
12+
- "That is"
13+
- "That was"
14+
- "There are"
15+
- "There were"
16+
- "These are"
17+
- "These were"
18+
- "This is"
19+
- "This was"
20+
- "Those are"
21+
- "Those were"

.hyperlint/automations/styles/plain-text-style-checks/eolwhitespace.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

.hyperlint/automations/styles/plain-text-style-checks/exclamation-marks.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

.hyperlint/automations/styles/plain-text-style-checks/heading-links.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

.hyperlint/automations/styles/plain-text-style-checks/heading-punctuation.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)