Skip to content

Commit d10f609

Browse files
authored
Add explicit link rule (#9089)
Signed-off-by: Fanit Kolchina <[email protected]>
1 parent c48cf9c commit d10f609

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "In links, use '{{site.url}}{{site.baseurl}}' instead of 'https://www.opensearch.org/docs/latest'."
3+
level: error
4+
nonword: true
5+
scope: raw
6+
tokens:
7+
- '\]\(https:\/\/www.opensearch.org\/docs\/latest'
8+

.github/vale/tests/test-style-pos.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ This sentence tests [links end slash]({{site.url}}{{site.baseurl}}/opensearch).
3838

3939
This sentence tests [links mid slash]({{site.url}}{{site.baseurl}}opensearch).
4040

41+
This sentence tests [links explicit](https://www.opensearch.org/docs/latest/double-slash/).
42+
4143
This sentence tests log-in as a noun. To login, we test this as a verb.
4244

4345
To test merge conflicts, remove tick marks in `<<<<<<< HEAD`.

.vale.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ OpenSearch.LatinismsSubstitution = YES
3838
OpenSearch.LinksDoubleParentheses = YES
3939
OpenSearch.LinksDoubleSlash = YES
4040
OpenSearch.LinksEndSlash = YES
41+
OpenSearch.LinksExplicit = YES
4142
OpenSearch.LinksMidSlash = YES
4243
OpenSearch.LoginNoun = YES
4344
OpenSearch.LoginVerb = YES

0 commit comments

Comments
 (0)