Skip to content

Commit

Permalink
chore: add acronym rule to vale DOC-940 (#2297)
Browse files Browse the repository at this point in the history
  • Loading branch information
addetz committed Feb 27, 2024
1 parent e88000b commit 1e5843c
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions vale/styles/spectrocloud/acronym.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
extends: conditional
message: "Use title case to define the acronym '%s'."
link: 'https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Acronyms'
level: error
ignorecase: false
scope: text
# Match two to five capital letters surrounded by brackets
# to detect an acronym definition.
first: '[(][A-Z]{2,5}[)]'
# Match two to five capitalised words separated by any number of dashes
# or whitespaces before the acronym definition.
second: '(\b(([A-Z][a-z]+)[\-\s ]{1,}){2,5})([(][A-Z]{2,5}[)])'
exceptions:
- (API)
- (AWS)
- (BYOOS)
- (CAPI)
- (CLI)
- (CPU)
- (CSS)
- (CSV)
- (FAQ)
- (GCP)
- (GET)
- (GPU)
- (HTML)
- (HTTP)
- (HTTPS)
- (IDE)
- (IP)
- (ISO)
- (JPEG)
- (JPG)
- (JSON)
- (OS)
- (OSS)
- (PDF)
- (PNG)
- (POST)
- (RAM)
- (SDK)
- (SQL)
- (SSH)
- (SSL)
- (SVG)
- (TCP)
- (URI)
- (URL)
- (USB)
- (VIP)
- (YAML)
- (YML)
- (XML)
- (ZIP)

0 comments on commit 1e5843c

Please sign in to comment.