Skip to content

Commit

Permalink
Add explicit link rule
Browse files Browse the repository at this point in the history
Signed-off-by: Fanit Kolchina <[email protected]>
  • Loading branch information
kolchfa-aws committed Jan 17, 2025
1 parent 2bd86c3 commit 911c924
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/).

Check failure on line 41 in .github/vale/tests/test-style-pos.md

View workflow job for this annotation

GitHub Actions / vale

[vale] .github/vale/tests/test-style-pos.md#L41

[OpenSearch.LinksExplicit] In links, use '{{site.url}}{{site.baseurl}}' instead of 'https://www.opensearch.org/docs/latest'.
Raw output
{"message": "[OpenSearch.LinksExplicit] In links, use '{{site.url}}{{site.baseurl}}' instead of 'https://www.opensearch.org/docs/latest'.", "location": {"path": ".github/vale/tests/test-style-pos.md", "range": {"start": {"line": 41, "column": 36}}}, "severity": "ERROR"}

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 911c924

Please sign in to comment.