Skip to content

Commit 3557377

Browse files
committed
Add new rules and guidance for describing/comparing numerical values
1 parent 4b16424 commit 3557377

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

ValeStyles/Couchbase/Values.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: When comparing or describing a value, use 'greater' or 'less'.
3+
level: warning
4+
link: https://docs.couchbase.com/styleguide/values.html
5+
6+
tokens:
7+
- '\b(?:above|below|higher|lower)\b\s+\d+(?:\.\d+)?'
8+
- '\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'

styleguide/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
** xref:articles.adoc[]
99
** xref:capitalization.adoc[]
1010
** xref:contractions.adoc[]
11+
** xref:values.adoc[]
1112
** xref:directional-language.adoc[]
1213
** xref:less-fewer.adoc[]
1314
** xref:only.adoc[]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
= Describing or Comparing Values
2+
3+
When describing or comparing numerical values in the documentation, use `greater than` or `less than`.
4+
5+
Do not use:
6+
7+
* higher
8+
* lower
9+
* above
10+
* below
11+
12+
If Vale flags an instance of `higher`, `lower`, `above`, or `below` that you feel is valid, let the tooling team know so an exception can be added to the rule.

0 commit comments

Comments
 (0)