Skip to content

Commit 5efa691

Browse files
authored
fix: enable vale workflow correctly to review documentation changes (#10211)
* fix: add config path to Vale workflow * test: add doc to test Vale linting * Update docs-website-vale.yml * test single docs folder * adjust rules * file for testing vale comments * adjust rules * abbreviation rule swap * simpler test file * adjust more rules after review * new testing mdx file * Delete test-component-page.mdx
1 parent f333aa6 commit 5efa691

19 files changed

+121
-46
lines changed

.github/workflows/docs-website-vale.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ jobs:
3232
- name: Vale
3333
uses: errata-ai/vale-action@v2
3434
with:
35-
files: |
36-
docs-website/docs
37-
docs-website/versioned_docs
35+
vale_flags: "--config=docs-website/.vale.ini"
36+
files: docs-website/docs
3837
reporter: github-pr-review
3938
fail_on_error: false
4039
env:

docs-website/.vale.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,17 @@ MinAlertLevel = suggestion
55

66
[*.{md,mdx}]
77
BasedOnStyles = Vale, Google, MyStyle
8+
9+
# Disable Vale's built-in spell checker (flags technical terms like "embedders")
10+
Vale.Spelling = NO
11+
12+
# Disable Google.Headings - conflicts with MyStyle.Headings (title case vs sentence case)
13+
# and doesn't handle PascalCase component names well
14+
Google.Headings = NO
15+
16+
# Disable Google.Passive - too noisy for technical documentation where passive voice
17+
# is often appropriate and hard to rephrase
18+
Google.Passive = NO
19+
20+
# Disable Google.Acronyms - AI/ML acronyms like RAG, LLM are well-known to our audience
21+
Google.Acronyms = NO

docs-website/.vale/styles/Google/Latin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ action:
99
swap:
1010
'\b(?:eg|e\.g\.)[\s,]': for example
1111
'\b(?:ie|i\.e\.)[\s,]': that is
12+
'\betc\.': and so on
13+
'\bvs\.': versus
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
extends: substitution
2+
message: "Use '%s' instead of the abbreviation '%s'."
3+
level: warning
4+
ignorecase: true
5+
action:
6+
name: replace
7+
swap:
8+
'\bmisc\b': miscellaneous
9+
'\bdoc\b': document

docs-website/.vale/styles/MyStyle/AvoidJust.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: existence
2+
message: "Avoid 'please' in instructions—it can make actions seem optional. Use imperative instead."
3+
level: warning
4+
ignorecase: true
5+
scope: text
6+
tokens:
7+
- please
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
extends: existence
2-
message: "Prefer second person (e.g., 'you') instead of '%s'."
2+
message: "Prefer second person ('you') instead of '%s'."
33
level: warning
4-
nonword: true
54
scope: text
65
tokens:
76
- the user
87
- the customer
98
- the client
10-
- he
11-
- she
12-
- his
13-
- her
9+
- '\bhe\b'
10+
- '\bshe\b'
11+
- '\bhis\b'
12+
- '\bher\b'
1413
- their system
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
extends: substitution
22
message: "'%s' is not the correct branding. Use '%s' instead."
33
level: error
4-
ignorecase: true
4+
ignorecase: false
55
swap:
66
Deepset: deepset
7+
DEEPSET: deepset
78
Huggingface: Hugging Face
89
huggingface: Hugging Face
910
HuggingFace: Hugging Face
10-
Haystack: Haystack # Pass-through to suppress errors from wrong variants
11-
haystack: Haystack
12-
Deepset Platform: deepset AI Platform
11+
HAYSTACK: Haystack

docs-website/.vale/styles/MyStyle/FileExtensions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
extends: substitution
2-
message: "Use uppercase for file extensions (e.g., '%s' → '%s')."
2+
message: "Use uppercase for file extensions: '%s' → '%s'."
33
level: warning
44
ignorecase: false
55
swap:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
extends: substitution
2+
message: "Use '%s' instead of '%s'."
3+
level: warning
4+
ignorecase: true
5+
action:
6+
name: replace
7+
swap:
8+
drop-down list: list
9+
drop-down: list
10+
dropdown: list
11+
radio button: option
12+
radio buttons: options
13+
text field: field
14+
text fields: fields
15+
text area: field
16+
hyperlink: link
17+
hyperlinks: links
18+
pop-up menu: context menu
19+
popup menu: context menu
20+
push button: button
21+
push buttons: buttons
22+
list box: list
23+
choice box: list
24+
pull-down list: list
25+
scroll bar: scroll

0 commit comments

Comments
 (0)