Skip to content

Commit 9b70181

Browse files
authored
Merge pull request #1474 from fluent/lynettemiles/sc-113209/add-vale-styles-and-vale-ini-to-fluent-bit
2 parents 4fc0a13 + e4cf5d6 commit 9b70181

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1082
-0
lines changed

.vale.ini

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
StylesPath = vale-styles
2+
MinAlertLevel = suggestion # suggestion, warning or error
3+
4+
[formats]
5+
mdx = md
6+
7+
[*.{md,markdown,txt,htm,html}]
8+
BasedOnStyles = FluentBit
9+
IgnoredScopes = tt, code
10+
11+
FluentBit.Terms = YES
12+
FluentBit.Titles = YES
13+
FluentBit.FutureTense = NO
14+
FluentBit.Headings = NO
15+
FluentBit.Passive = NO
16+
FluentBit.Subjunctive = NO
17+
FluentBit.Colons = NO

vale-styles/FluentBit/AMPM.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
extends: existence
3+
message: "Use 'AM' or 'PM' (preceded by a space)."
4+
link: 'https://developers.google.com/style/word-list'
5+
level: suggestion
6+
nonword: true
7+
tokens:
8+
- '\d{1,2}[AP]M'
9+
- '\d{1,2} ?[ap]m'
10+
- '\d{1,2} ?[aApP]\.[mM]\.'

vale-styles/FluentBit/Acronyms.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
extends: conditional
2+
message: "Spell out '%s', if it's unfamiliar to the audience."
3+
link: 'https://developers.google.com/style/abbreviations'
4+
level: suggestion
5+
ignorecase: false
6+
# Ensures that the existence of 'first' implies the existence of 'second'.
7+
first: '\b([A-Z]{3,5})\b'
8+
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
9+
# ... with the exception of these:
10+
exceptions:
11+
- ACL
12+
- API
13+
- ARN
14+
- ASC
15+
- ASP
16+
- AWS
17+
- CIDR
18+
- CLI
19+
- CPU
20+
- CRD
21+
- CSS
22+
- CSV
23+
- DEBUG
24+
- DESC
25+
- DOM
26+
- DNS
27+
- DPI
28+
- DPPS
29+
- FAQ
30+
- FIPS
31+
- GCC
32+
- GCP
33+
- GDB
34+
- GET
35+
- GNU
36+
- GPG
37+
- GPU
38+
- GTK
39+
- GUI
40+
- GZIP
41+
- HPA
42+
- IAM
43+
- HTML
44+
- HTTP
45+
- HTTPS
46+
- IDE
47+
- JAR
48+
- JSON
49+
- JSX
50+
- LESS
51+
- LLDB
52+
- LTS
53+
- NET
54+
- NOTE
55+
- NVDA
56+
- OSS
57+
- PATH
58+
- PEM
59+
- PDF
60+
- PHP
61+
- POSIX
62+
- POST
63+
- RAM
64+
- REPL
65+
- REST
66+
- RHEL
67+
- RPC
68+
- RSA
69+
- SASL
70+
- SCM
71+
- SCSS
72+
- SDK
73+
- SIEM
74+
- SLA
75+
- SQL
76+
- SSH
77+
- SSL
78+
- SSO
79+
- SVG
80+
- TBD
81+
- TCP
82+
- TLS
83+
- TRE
84+
- TODO
85+
- UDP
86+
- URI
87+
- URL
88+
- USB
89+
- UTC
90+
- UTF
91+
- UUID
92+
- XML
93+
- XSS
94+
- YAML
95+
- ZIP

vale-styles/FluentBit/AmSpelling.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "In general, use American spelling instead of '%s'."
3+
link: 'https://developers.google.com/style/spelling'
4+
ignorecase: true
5+
level: suggestion
6+
tokens:
7+
- '(?:\w+)nised?'
8+
- '(?:\w+)logue'

vale-styles/FluentBit/Ampersand.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
extends: existence
3+
message: "Don't use an ampersand in place of the word 'and'. Always write out 'and' unless the ampersand is part of a proper name."
4+
nonword: true
5+
ignorecase: false
6+
level: error
7+
scope: sentence
8+
tokens:
9+
- '[^\*{2}].*.&.*[^\*{2}]\n'

vale-styles/FluentBit/Colons.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "'%s' should be in lowercase."
3+
link: 'https://developers.google.com/style/colons'
4+
nonword: true
5+
level: suggestion
6+
scope: sentence
7+
tokens:
8+
- ':\s[A-Z]'
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
extends: substitution
2+
message: "Feel free to use '%s' instead of '%s'."
3+
link: 'https://developers.google.com/style/contractions'
4+
level: suggestion
5+
ignorecase: true
6+
action:
7+
name: replace
8+
swap:
9+
are not: aren't
10+
cannot: can't
11+
could not: couldn't
12+
did not: didn't
13+
do not: don't
14+
does not: doesn't
15+
has not: hasn't
16+
have not: haven't
17+
how is: how's
18+
is not: isn't
19+
it is: it's
20+
should not: shouldn't
21+
that is: that's
22+
they are: they're
23+
was not: wasn't
24+
we are: we're
25+
we have: we've
26+
were not: weren't
27+
what is: what's
28+
when is: when's
29+
where is: where's
30+
will not: won't

vale-styles/FluentBit/DateFormat.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
extends: existence
2+
message: "Use 'July 31, 2016' format, not '%s'."
3+
link: 'https://developers.google.com/style/dates-times'
4+
ignorecase: true
5+
level: suggestion
6+
nonword: true
7+
tokens:
8+
- '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}'
9+
- '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}'

vale-styles/FluentBit/Directional.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
extends: existence
3+
message: "Verify your use of '%s' with the Style Guide."
4+
level: suggestion
5+
ignorecase: true
6+
tokens:
7+
- above
8+
- below

vale-styles/FluentBit/DontUse.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
extends: existence
3+
message: "We don't use '%s'."
4+
ignorecase: true
5+
level: suggestion
6+
tokens:
7+
- a.k.a.
8+
- aka
9+
- and/or
10+
- at this point
11+
- desire
12+
- it is recommended that
13+
- just
14+
- note that
15+
- please
16+
- quite
17+
- such that
18+
- thus

0 commit comments

Comments
 (0)