From 1e5843cfeeda6e300a598a5d347ff0a678cef30d Mon Sep 17 00:00:00 2001 From: Adelina Simion <43963729+addetz@users.noreply.github.com> Date: Tue, 27 Feb 2024 21:10:08 +0100 Subject: [PATCH] chore: add acronym rule to vale DOC-940 (#2297) --- vale/styles/spectrocloud/acronym.yml | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 vale/styles/spectrocloud/acronym.yml diff --git a/vale/styles/spectrocloud/acronym.yml b/vale/styles/spectrocloud/acronym.yml new file mode 100644 index 0000000000..75e0b77f30 --- /dev/null +++ b/vale/styles/spectrocloud/acronym.yml @@ -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)