Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
hazel-nut committed Apr 19, 2024
1 parent baff770 commit e2623c4
Show file tree
Hide file tree
Showing 38 changed files with 1,470 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
StylesPath = styles

Vocab = DigitalOcean, Technical

[*.md]
# Vale enforces Vocab. DigitalOcean is global DO style.
BasedOnStyles = Vale, DigitalOcean, PDocs

# Superceded by DigitalOcean.Spelling
Vale.Spelling = NO
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ This repository contains a [Vale-compatible](https://vale.sh/) implementation of
To get started, add the package to your configuration file (as shown below) and then run `vale sync`.

```ini
StylesPath = styles
MinAlertLevel = suggestion

Packages = DigitalOcean

[*]
BasedOnStyles = Vale, DigitalOcean
StylesPath = styles # Use your normal style path here.
Packages = https://github.com/digitalocean/vale-package/releases/latest/download/DigitalOcean.zip
```

See [Vale's documentation on packages](https://vale.sh/docs/topics/packages/) for more information.

## Included Components

* The `DigitalOcean` style implements the universal DigitalOcean style guide.
* The `PDocs` style implements the DigitalOcean Product Docs style guide.
* The `DigitalOcean` vocab implements DigitalOcean-specific terminology.
* The `Technical` vocab implements more general technical terminology.
9 changes: 9 additions & 0 deletions styles/DigitalOcean/AMPM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: Use 'AM' or 'PM' preceded by a space to denote times.
link: https://docs.digitalocean.com/style/digitalocean/language/dates-and-times
level: error
nonword: true
tokens:
- '\d{1,2}[AP]M'
- '\d{1,2} ?[ap]m'
- '\d{1,2} ?[aApP]\.[mM]\.'
28 changes: 28 additions & 0 deletions styles/DigitalOcean/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
extends: conditional
message: "'%s' has no definition."
link: https://docs.digitalocean.com/style/digitalocean/language/acronyms
level: suggestion
ignorecase: false
# Ensures that the existence of 'first' implies the existence of 'second'.
first: '\b([A-Z]{3,5})\b'
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
# ... with the exception of these:
exceptions:
- API
- CLI
- CPU
- FAQ
- GPU
- HTML
- HTTP
- HTTPS
- JSON
- PDF
- PHP
- RAM
- SSH
- SQL
- URL
- USB
- YAML
- ZIP
14 changes: 14 additions & 0 deletions styles/DigitalOcean/CaseSensitiveSpellingSuggestions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: false
level: error
action:
name: replace
swap:
"[Ii]ngress.NGINX": Ingress-NGINX
".ngress.[Nn]ginx": Ingress-NGINX
"[Nn]ginx [Ii]ngress [Cc]ontroller": NGINX Ingress Controller
"NGINX ingress [Cc]ontroller": NGINX Ingress Controller
"NGINX [Ii]ngress controller": NGINX Ingress Controller
"(?<!Ingress-)(?:Nginx|NGINX)(?! Ingress)": nginx
"(?<!Ingress-)(?:Nginx|NGINX)'s(?! Ingress)": nginx's
17 changes: 17 additions & 0 deletions styles/DigitalOcean/ConsiderateWriting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: substitution
message: Consider using '%s' instead of '%s'.
link: https://docs.digitalocean.com/style/digitalocean/language/considerate-language
ignorecase: true
level: warning
action:
name: replace
swap:
sane: correct|adequate|sufficient|consistent|valid|coherent|sensible|reasonable
hang: freeze|stop responding|become unresponsive
(?:crazy|insane): extremely|very|illogical|unreasonable
insanely: incredibly
dummy: placeholder|stand-in|test
stupid: foolish|ludicrous|unintelligent
(?:fall|fell|falling) on deaf ears: missed the mark|was ignored
blind spot: weakness|something we overlooked
sanity check: check
40 changes: 40 additions & 0 deletions styles/DigitalOcean/DateNumerals.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
extends: existence
message: "Don't use ordinal numbers for dates."
link: https://docs.digitalocean.com/style/digitalocean/language/dates-and-times
level: error
nonword: true
ignorecase: true
raw:
- \b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?)\b\s*
tokens:
- first
- second
- third
- fourth
- fifth
- sixth
- seventh
- eighth
- ninth
- tenth
- eleventh
- twelfth
- thirteenth
- fourteenth
- fifteenth
- sixteenth
- seventeenth
- eighteenth
- nineteenth
- twentieth
- twenty-first
- twenty-second
- twenty-third
- twenty-fourth
- twenty-fifth
- twenty-sixth
- twenty-seventh
- twenty-eighth
- twenty-ninth
- thirtieth
- thirty-first
8 changes: 8 additions & 0 deletions styles/DigitalOcean/DateSpellMonth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Always spell out the name of the month."
link: https://docs.digitalocean.com/style/digitalocean/language/dates-and-times
ignorecase: true
level: error
nonword: true
tokens:
- '\b\d{1,2}/\d{1,2}/(?:\d{4}|\d{2})\b'
23 changes: 23 additions & 0 deletions styles/DigitalOcean/DigitalOceanTerms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
extends: substitution
message: "Use '%s' instead of '%s'."
link: https://docs.digitalocean.com/style/digitalocean/products/
ignorecase: false
level: error
action:
name: replace
swap:
1-click [Aa]pp(?:|lication)[s]?: 1-Click App(lication)
1-[Cc]lick app(?:|lication)[s]?: 1-Click App(lication)
1-[Cc]licks: 1-Click App(lication)
DigitalOcean [Cc]ontainer registry: DigitalOcean Container Registry
DigitalOcean container [Rr]egistry: DigitalOcean Container Registry
DigitalOcean [Cc]ontrol panel: DigitalOcean Control Panel
DigitalOcean control [Pp]anel: DigitalOcean Control Panel
DigitalOcean [Dd]roplet console: DigitalOcean Droplet Console
'[Cc]loudWays': Cloudways
Cloud [Ww]ays': Cloudways
Cloudways academy: Cloudways Academy
Digital [Oo]cean: DigitalOcean
'Digitalocean': DigitalOcean
'digitalocean^(?:.com)': DigitalOcean
droplet[s]?: Droplet(s)
13 changes: 13 additions & 0 deletions styles/DigitalOcean/FutureTense.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends: existence
message: "Use present tense verbs, not future tense verbs like '%s'. Say '(event) happens' instead of '(event) will happen'."
link: https://docs.digitalocean.com/style/digitalocean/language/verbs
ignorecase: true
level: error
action:
name: remove
tokens:
- will
- shall
- won't
- shan't
- "[A-Za-z]*'ll"
24 changes: 24 additions & 0 deletions styles/DigitalOcean/GenderBias.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
extends: substitution
message: "Consider using '%s' instead of '%s'."
link: https://docs.digitalocean.com/style/digitalocean/language/considerate-language
ignorecase: true
level: error
action:
name: replace
swap:
(?:alumna|alumnus): graduate
(?:alumnae|alumni): graduates
authoress: author
fresh(?:m[ae]n|wom[ae]n): first-year student(s)
ladylike: courteous
landlord: building manager
mankind: humankind
manmade: manufactured
manpower: personnel
middle(?:m[ae]n|wom[ae]n): intermediary
oneupmanship: upstaging
repair(?:m[ae]n|wom[ae]n): technician(s)
sales(?:m[ae]n|wom[ae]n): salesperson or sales people
work(?:m[ae]n|wom[ae]n): worker(s)
manhours: workhours
manpower: staff
14 changes: 14 additions & 0 deletions styles/DigitalOcean/Hyphens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends: existence
message: "'%s' doesn't need a hyphen."
link: https://docs.digitalocean.com/style/digitalocean/grammar/hyphens
level: warning
ignorecase: false
nonword: true
action:
name: edit
params:
- replace
- '-'
- ' '
tokens:
- '\s[^\s-]+ly-'
13 changes: 13 additions & 0 deletions styles/DigitalOcean/OrdinalLy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends: existence
message: "Don't add -ly to an ordinal number."
link: https://docs.digitalocean.com/style/digitalocean/grammar/hyphens/
level: error
action:
name: edit
params:
- trim
- ly
tokens:
- firstly
- secondly
- thirdly
7 changes: 7 additions & 0 deletions styles/DigitalOcean/Percentages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: existence
message: "Use a numeral plus the units."
link: https://docs.digitalocean.com/style/digitalocean/grammar/numbers
nonword: true
level: error
tokens:
- '\b[a-zA-z]+\spercent\b'
17 changes: 17 additions & 0 deletions styles/DigitalOcean/RacialBias.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: substitution
message: "Use '%s' instead of '%s'."
link: https://docs.digitalocean.com/style/digitalocean/language/considerate-language
ignorecase: true
level: error
action:
name: replace
swap:
master: main
slave: secondary
whitelist: allowlist
whitelisting: allowlisting
whitelisted: allowlisted
blacklist: denylist
blacklisting: denylisting
blacklisted: denylisted
grandfathered in: carried over
8 changes: 8 additions & 0 deletions styles/DigitalOcean/SerialComma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Use a serial comma in '%s'."
link: https://docs.digitalocean.com/style/digitalocean/grammar/commas
scope: sentence
level: warning
nonword: true
tokens:
- '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]'
8 changes: 8 additions & 0 deletions styles/DigitalOcean/SingularThey.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Use singular 'they' instead of '%s'."
link: https://docs.digitalocean.com/style/digitalocean/language/singular-they
level: error
ignorecase: true
tokens:
- he/she
- s/he
8 changes: 8 additions & 0 deletions styles/DigitalOcean/SpaceAfterPeriod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Use one space after periods ('%s')."
link: https://docs.digitalocean.com/style/digitalocean/grammar/periods
level: warning
nonword: true
tokens:
- '[A-Z]?[a-z]+[.?!] {2,}[A-Z][a-z]*'
- '[A-Z]?[a-z]+[.?!][A-Z][a-z]*'
5 changes: 5 additions & 0 deletions styles/DigitalOcean/Spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: spelling
message: "Is '%s' spelled correctly? Is it missing code formatting?"
level: error
ignore:
- ignore/words-with-suggestions.txt
32 changes: 32 additions & 0 deletions styles/DigitalOcean/SpellingSuggestions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: true
level: error
action:
name: replace
swap:
nameserver[s]?: name server(s)
hyperthread(?:s|ed|ing)?: hyper-thread(s)
timeseries: time series
data center[s]?: datacenter(s)
ruleset[s]?: rule set(s)
multi-cloud: multicloud
cyberattack(?:|s|er): cyber-attack(s)
timeslot[s]?: time slot(s)
webpage[s]?: web page(s)
keypair[s]?: key pair(s)
walkthrough[s]?: walk-through(s)
webserver[s]?: web server(s)
knowledgebase[s]?: knowledge base(s)
timeframe[s]?: time frame(s)
multicore: multi-core
datapoint[s]?: data point(s)
datatype[s]?: data type(s)
mailserver[s]?: mail server(s)
ratelimit(?:|s|ed|ing)?: rate limit
pageview[s]?: page view(s)
navbar[s]?: menu
unaccessible: inaccessible
uncompress: decompress
pulldown: pull-down
an URL: a URL
16 changes: 16 additions & 0 deletions styles/DigitalOcean/Units.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
extends: existence
message: "Don't spell out the number in '%s'."
link: https://docs.digitalocean.com/style/digitalocean/grammar/numbers
level: error
raw:
- '[a-zA-Z]+\s'
tokens:
- '(?:centi|milli)?meters'
- '(?:kilo)?grams'
- '(?:kilo)?meters'
- '(?:mega)?pixels'
- cm
- inches
- lb
- miles
- pounds
Loading

0 comments on commit e2623c4

Please sign in to comment.