Skip to content

Commit c8b923f

Browse files
authored
Add a case-sensitive substitution error rule to Vale (opensearch-project#9139)
Signed-off-by: Fanit Kolchina <[email protected]>
1 parent 64b9fb3 commit c8b923f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: substitution
2+
message: "Use '%s' instead of '%s'. Note the correct capitalization."
3+
ignorecase: false
4+
level: error
5+
action:
6+
name: replace
7+
swap:
8+
'Retrieval-Augmented Generation': retrieval-augmented generation

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

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ This sentence tests splling.
7676

7777
This sentence tests substitution error by using the word indices.
7878

79+
This sentence tests substitution case-sensitive error by using the word Retrieval-Augmented Generation.
80+
7981
This sentence tests substitution suggestion due to its nature.
8082

8183
This Table | tests capitalization

.vale.ini

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ OpenSearch.SpacingSlash = YES
6161
OpenSearch.SpacingWords = YES
6262
OpenSearch.Spelling = YES
6363
OpenSearch.StackedHeadings = YES
64+
OpenSearch.SubstitutionsErrorCaseSensitive = YES
6465
OpenSearch.SubstitutionsError = YES
6566
OpenSearch.SubstitutionsSuggestion = YES
6667
OpenSearch.TableHeadings = YES

0 commit comments

Comments
 (0)