Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ece1a78
Sketch of Vale test
osfameron Jun 11, 2025
f596a82
tweak expected results
osfameron Jun 11, 2025
d4037e8
Style Tests
osfameron Jun 13, 2025
f54f47f
Some more tests (and driveby fixes for review)
osfameron Jun 13, 2025
37a1486
Stub tests for all Couchbase styles
osfameron Jun 13, 2025
a51923e
Split the .adoc file into YAML declarations
osfameron Jun 15, 2025
2eaa7ab
Fixed tests for this style
osfameron Jun 15, 2025
7e6b290
intermediate datastructure
osfameron Jun 15, 2025
6feeb4b
reinstate tests
osfameron Jun 15, 2025
cfa23bc
remove debugging
osfameron Jun 15, 2025
ae70f05
highlight.js + test
osfameron Jun 16, 2025
529dedb
remove commented code
osfameron Jun 16, 2025
603d747
Highlight the style infractions
osfameron Jun 16, 2025
5200905
better VentilatedProse test.
osfameron Jun 16, 2025
28f3b0d
Updated format of output
osfameron Jun 16, 2025
302a4c7
Tweak repeated space test
osfameron Jun 16, 2025
4ac17f5
more style tweaks
osfameron Jun 16, 2025
cf7c30e
delete RepeatedWord test and update html
osfameron Jun 17, 2025
d44c17b
Update tests and HTML
osfameron Jun 20, 2025
3e284c1
diagnostics
osfameron Jun 20, 2025
27e77dd
install vale
osfameron Jun 20, 2025
bbeb9e1
add .vale.ini
osfameron Jun 20, 2025
40f6ea6
reset to all used in actual config
osfameron Jun 20, 2025
e597f6a
diagnostics
osfameron Jun 20, 2025
102bcbf
diagnostics
osfameron Jun 20, 2025
f63c352
working-directory
osfameron Jun 20, 2025
3c1c322
readdir diagnostics
osfameron Jun 20, 2025
7207095
more diag
osfameron Jun 20, 2025
901d7ba
toString
osfameron Jun 20, 2025
b63fc9f
more diagnostics
osfameron Jun 23, 2025
4795a30
more diagnostics
osfameron Jun 23, 2025
dfefb68
more diag
osfameron Jun 23, 2025
983ce62
Fixed UnexplainedAcronym rule
osfameron Jun 23, 2025
3e84afc
diagnostics
osfameron Jun 30, 2025
484bfa1
explicit config location
osfameron Jun 30, 2025
7917d60
no-global ?
osfameron Jun 30, 2025
459f6bc
VALE_STYLES_PATH
osfameron Jun 30, 2025
3b2d0bf
fix
osfameron Jun 30, 2025
3d04073
fix
osfameron Jun 30, 2025
573295c
tweak
osfameron Jun 30, 2025
7779d4a
experiment hardcode single fixture
osfameron Jun 30, 2025
479eeb2
use Github Actions $RUNNER_TEMP variable
osfameron Jun 30, 2025
4cd7b7d
revert tweaks
osfameron Jun 30, 2025
80b722d
explain workaround, back out diagnostics.
osfameron Jun 30, 2025
c121f6d
remove final diagnostics
osfameron Jun 30, 2025
c265aa2
upload styles.html as artifact
osfameron Jun 30, 2025
6b73cb8
Update PR against main
osfameron Sep 3, 2025
c748535
Removing contradictory 'we are' contraction from Contractions.yml. Fi…
sarahlwelton Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/test-vale-styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,38 @@ jobs:
npm-test:
runs-on: ubuntu-latest
steps:
- name: install asciidoctor
run: |
sudo apt-get install -y asciidoctor

- name: install vale
run: |
sudo snap install vale

- name: checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- name: diagnose Vale
working-directory: ./ValeStyles
run: |
vale -v
vale ls-dirs
vale ls-config
vale ls-vars

- name: npm test
working-directory: ./ValeStyles
run: |
npm ci
npm test

- name: Upload Vale HTML test
uses: actions/upload-artifact@v4
with:
name: Vale HTML test results
path: ValeStyles/test/adoc/styles.html
if-no-files-found: error
1 change: 1 addition & 0 deletions ValeStyles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.actual
32 changes: 32 additions & 0 deletions ValeStyles/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
StylesPath = "."
MinAlertLevel = suggestion

Vocab = Couchbase

[asciidoctor]
description = YES
docname = YES
doctitle = YES
doctype = YES
docfile = YES
example-caption = YES
figure-caption = YES
important-caption = YES
listing-caption = YES
note-caption = YES
outfile = YES
part-signifier = YES
preface-title = YES
table-caption = YES
tip-caption = YES
toc-title = YES
warning-caption = YES

experimental = YES

attribute-missing = drop

[*.{adoc,md,txt}]
BasedOnStyles = Vale, write-good, proselint, Couchbase, Google

Vale.Spelling = NO
3 changes: 2 additions & 1 deletion ValeStyles/Couchbase/Button.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends: existence
message: "Do not refer to a UI element with the word 'button', as in 'Click the Edit button'. Make sure to use the button macro (btn:[])."
level: error
link: https://docs.couchbase.com/styleguide/button-macro.html
scope: raw

tokens:
- '(?i)\bclick the(?: \*?[\w-]+\*?)* button\b'
- '(?i)\bclick the \*?[\w -]+\*? button\b'
1 change: 1 addition & 0 deletions ValeStyles/Couchbase/ButtonMacro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ message: Did you follow the guidelines for the button macro?
link: https://docs.couchbase.com/styleguide/button-macro.html
nonword: true
level: suggestion
scope: raw

tokens:
- btn\:\[.+\]
1 change: 0 additions & 1 deletion ValeStyles/Couchbase/Contractions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ swap:
how is: how's
that is: that's
they are: they're
we are: we're
what is: what's
where is: where's
who is: who's
Expand Down
6 changes: 3 additions & 3 deletions ValeStyles/Couchbase/Dialogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ extends: existence
message: Don't bold or capitalize the word "dialog".
link: https://docs.couchbase.com/styleguide/dialogs.html
level: error
nonword: true
scope: raw
nonword: true

tokens:
- '\*.+[Dd]ialog\*'
- '\*.+\*\sDialog'
- '\*[^*]*[Dd]ialog[^*]*\*'
- '\bDialog\b'
1 change: 1 addition & 0 deletions ValeStyles/Couchbase/DirectionalLanguage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends: existence
message: Avoid directional language like '%s'.
level: warning
link: https://docs.couchbase.com/styleguide/directional-language.html
ignorecase: true

tokens:
- left
Expand Down
3 changes: 2 additions & 1 deletion ValeStyles/Couchbase/Dropdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ level: error
tokens:
- dropdown
- drop down
- drop-down
- dropdowns
- drop downs
- drop downs
9 changes: 5 additions & 4 deletions ValeStyles/Couchbase/Italics.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
extends: existence
message: Don't use italics. Find another way to add emphasis.
level: error
link: https://docs.couchbase.com/styleguide/italic.html
scope:
- raw
scope: raw
nonword: true
level: error

tokens:
- '(?<!`)\b_\w.*?_\b(?!`)'
- '\|\s*_(.*?)_'
- '\|\s*_(.*?)_'
2 changes: 1 addition & 1 deletion ValeStyles/Couchbase/Link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ level: error
link: https://docs.couchbase.com/styleguide/ui-links.html

tokens:
- '(?i)\bclick the(?: \*?[\w-]+\*?)* link\b'
- '(?i)\bclick the(?: \*?[\w-]+\*?)* link\b'
6 changes: 3 additions & 3 deletions ValeStyles/Couchbase/UnexplainedAcronym.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: conditional
message: "'%s' hasn't been defined. Spell it out if it's unfamiliar to the audience."
link: 'https://developers.google.com/style/abbreviations'
level: error
scope: text
# scope: text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we comment out the scope setting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, driveby hack hack hack hack...
and it seems not to be necessary? (At least according to the minimal test cases)

Happy to revert, but we might as well make it part of the test: can you provide a counterexample that it's needed for?

Copy link
Contributor

@sarahlwelton sarahlwelton Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works without it, don't worry about it - was just curious.

I can't find the documentation around the text scope now to figure out what it's supposed to limit.

ignorecase: false
# Ensures that the existence of 'first' implies the existence of 'second'.
first: '\b([A-Z]{3,5})\b'
Expand Down Expand Up @@ -94,7 +94,7 @@ exceptions:
- NEST
- NOT
- NOTE
- NULL
- "NULL" # because YAML
- NULLS
- NVDA
- ORDER
Expand Down Expand Up @@ -167,4 +167,4 @@ exceptions:
- XOR
- XSS
- YAML
- ZIP
- ZIP
4 changes: 3 additions & 1 deletion ValeStyles/Couchbase/Values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ extends: existence
message: When comparing or describing a value, use 'greater' or 'less'.
level: warning
link: https://docs.couchbase.com/styleguide/values.html
scope:
- raw # nothing is flagged if this is set to 'text'???

tokens:
- '\b(?:above|below|higher|lower)\b\s+\d+(?:\.\d+)?'
- '\b(?:above|below|higher|lower)\b(?:\s+the|\s+than)?(?:\s+\w+){0,5}?\s+(?:limit|threshold|maximum|minimum|cap|ceiling|floor|boundary|cutoff)\b'
- '\b(?:above|below|higher|lower)\b(?:\s+the|\s+than)?(?:\s+\w+){0,5}?\s+(?:limit|threshold|maximum|minimum|cap|ceiling|floor|boundary|cutoff)\b'
Loading