Skip to content

Commit

Permalink
Add explicit link rule (#9089)
Browse files Browse the repository at this point in the history
Signed-off-by: Fanit Kolchina <[email protected]>
  • Loading branch information
kolchfa-aws authored Jan 17, 2025
1 parent c48cf9c commit d10f609
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/vale/styles/OpenSearch/LinksExplicit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "In links, use '{{site.url}}{{site.baseurl}}' instead of 'https://www.opensearch.org/docs/latest'."
level: error
nonword: true
scope: raw
tokens:
- '\]\(https:\/\/www.opensearch.org\/docs\/latest'

2 changes: 2 additions & 0 deletions .github/vale/tests/test-style-pos.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ This sentence tests [links end slash]({{site.url}}{{site.baseurl}}/opensearch).

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

This sentence tests [links explicit](https://www.opensearch.org/docs/latest/double-slash/).

This sentence tests log-in as a noun. To login, we test this as a verb.

To test merge conflicts, remove tick marks in `<<<<<<< HEAD`.
Expand Down
1 change: 1 addition & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ OpenSearch.LatinismsSubstitution = YES
OpenSearch.LinksDoubleParentheses = YES
OpenSearch.LinksDoubleSlash = YES
OpenSearch.LinksEndSlash = YES
OpenSearch.LinksExplicit = YES
OpenSearch.LinksMidSlash = YES
OpenSearch.LoginNoun = YES
OpenSearch.LoginVerb = YES
Expand Down

0 comments on commit d10f609

Please sign in to comment.