From b2b6f235dd2cd9978212b1f0355822428cc5cf31 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Tue, 1 Aug 2023 10:38:04 -0500 Subject: [PATCH] Vale linter config (#5060) * chore(quality-of-life): Initial commit of Vale config, InfluxDataDocs style, and Vocab files for linting docs. * Update content/influxdb/cloud-dedicated/.vale.ini * Update content/influxdb/cloud-serverless/.vale.ini * chore(ci): add terms. * chore(ci): add vale terms * chore(ci): add vale terms --- .ci/vale/styles/.vale-config/1-Hugo.ini | 8 + .ci/vale/styles/Google/AMPM.yml | 9 + .ci/vale/styles/Google/Acronyms.yml | 64 +++ .ci/vale/styles/Google/Colons.yml | 8 + .ci/vale/styles/Google/Contractions.yml | 30 ++ .ci/vale/styles/Google/DateFormat.yml | 9 + .ci/vale/styles/Google/Ellipses.yml | 9 + .ci/vale/styles/Google/EmDash.yml | 12 + .ci/vale/styles/Google/EnDash.yml | 13 + .ci/vale/styles/Google/Exclamation.yml | 9 + .ci/vale/styles/Google/FirstPerson.yml | 13 + .ci/vale/styles/Google/Gender.yml | 9 + .ci/vale/styles/Google/GenderBias.yml | 47 +++ .ci/vale/styles/Google/HeadingPunctuation.yml | 13 + .ci/vale/styles/Google/Headings.yml | 29 ++ .ci/vale/styles/Google/Latin.yml | 11 + .ci/vale/styles/Google/LyHyphens.yml | 14 + .ci/vale/styles/Google/OptionalPlurals.yml | 12 + .ci/vale/styles/Google/Ordinal.yml | 7 + .ci/vale/styles/Google/OxfordComma.yml | 7 + .ci/vale/styles/Google/Parens.yml | 7 + .ci/vale/styles/Google/Passive.yml | 184 +++++++++ .ci/vale/styles/Google/Periods.yml | 7 + .ci/vale/styles/Google/Quotes.yml | 7 + .ci/vale/styles/Google/Ranges.yml | 7 + .ci/vale/styles/Google/Semicolons.yml | 8 + .ci/vale/styles/Google/Slang.yml | 11 + .ci/vale/styles/Google/Spacing.yml | 10 + .ci/vale/styles/Google/Spelling.yml | 10 + .ci/vale/styles/Google/Units.yml | 8 + .ci/vale/styles/Google/We.yml | 11 + .ci/vale/styles/Google/Will.yml | 7 + .ci/vale/styles/Google/WordList.yml | 81 ++++ .ci/vale/styles/Google/meta.json | 4 + .ci/vale/styles/Google/vocab.txt | 0 .ci/vale/styles/InfluxDataDocs/Branding.yml | 9 + .../styles/InfluxDataDocs/Capitalization.yml | 379 ++++++++++++++++++ .ci/vale/styles/InfluxDataDocs/Spelling.yml | 6 + .../InfluxDataDocs/Terms/query-functions.txt | 376 +++++++++++++++++ .../styles/Vocab/Cloud-Dedicated/accept.txt | 0 .../styles/Vocab/Cloud-Dedicated/reject.txt | 4 + .../styles/Vocab/Cloud-Serverless/accept.txt | 0 .../styles/Vocab/Cloud-Serverless/reject.txt | 4 + .ci/vale/styles/Vocab/InfluxData/accept.txt | 55 +++ .ci/vale/styles/Vocab/InfluxData/reject.txt | 1 + .vale.ini | 12 + .vscode/settings.json | 2 +- content/influxdb/cloud-dedicated/.vale.ini | 12 + content/influxdb/cloud-serverless/.vale.ini | 12 + 49 files changed, 1566 insertions(+), 1 deletion(-) create mode 100644 .ci/vale/styles/.vale-config/1-Hugo.ini create mode 100644 .ci/vale/styles/Google/AMPM.yml create mode 100644 .ci/vale/styles/Google/Acronyms.yml create mode 100644 .ci/vale/styles/Google/Colons.yml create mode 100644 .ci/vale/styles/Google/Contractions.yml create mode 100644 .ci/vale/styles/Google/DateFormat.yml create mode 100644 .ci/vale/styles/Google/Ellipses.yml create mode 100644 .ci/vale/styles/Google/EmDash.yml create mode 100644 .ci/vale/styles/Google/EnDash.yml create mode 100644 .ci/vale/styles/Google/Exclamation.yml create mode 100644 .ci/vale/styles/Google/FirstPerson.yml create mode 100644 .ci/vale/styles/Google/Gender.yml create mode 100644 .ci/vale/styles/Google/GenderBias.yml create mode 100644 .ci/vale/styles/Google/HeadingPunctuation.yml create mode 100644 .ci/vale/styles/Google/Headings.yml create mode 100644 .ci/vale/styles/Google/Latin.yml create mode 100644 .ci/vale/styles/Google/LyHyphens.yml create mode 100644 .ci/vale/styles/Google/OptionalPlurals.yml create mode 100644 .ci/vale/styles/Google/Ordinal.yml create mode 100644 .ci/vale/styles/Google/OxfordComma.yml create mode 100644 .ci/vale/styles/Google/Parens.yml create mode 100644 .ci/vale/styles/Google/Passive.yml create mode 100644 .ci/vale/styles/Google/Periods.yml create mode 100644 .ci/vale/styles/Google/Quotes.yml create mode 100644 .ci/vale/styles/Google/Ranges.yml create mode 100644 .ci/vale/styles/Google/Semicolons.yml create mode 100644 .ci/vale/styles/Google/Slang.yml create mode 100644 .ci/vale/styles/Google/Spacing.yml create mode 100644 .ci/vale/styles/Google/Spelling.yml create mode 100644 .ci/vale/styles/Google/Units.yml create mode 100644 .ci/vale/styles/Google/We.yml create mode 100644 .ci/vale/styles/Google/Will.yml create mode 100644 .ci/vale/styles/Google/WordList.yml create mode 100644 .ci/vale/styles/Google/meta.json create mode 100644 .ci/vale/styles/Google/vocab.txt create mode 100644 .ci/vale/styles/InfluxDataDocs/Branding.yml create mode 100644 .ci/vale/styles/InfluxDataDocs/Capitalization.yml create mode 100644 .ci/vale/styles/InfluxDataDocs/Spelling.yml create mode 100644 .ci/vale/styles/InfluxDataDocs/Terms/query-functions.txt create mode 100644 .ci/vale/styles/Vocab/Cloud-Dedicated/accept.txt create mode 100644 .ci/vale/styles/Vocab/Cloud-Dedicated/reject.txt create mode 100644 .ci/vale/styles/Vocab/Cloud-Serverless/accept.txt create mode 100644 .ci/vale/styles/Vocab/Cloud-Serverless/reject.txt create mode 100644 .ci/vale/styles/Vocab/InfluxData/accept.txt create mode 100644 .ci/vale/styles/Vocab/InfluxData/reject.txt create mode 100644 .vale.ini create mode 100644 content/influxdb/cloud-dedicated/.vale.ini create mode 100644 content/influxdb/cloud-serverless/.vale.ini diff --git a/.ci/vale/styles/.vale-config/1-Hugo.ini b/.ci/vale/styles/.vale-config/1-Hugo.ini new file mode 100644 index 000000000..3b014081d --- /dev/null +++ b/.ci/vale/styles/.vale-config/1-Hugo.ini @@ -0,0 +1,8 @@ +[*.md] +# Exclude `{{< ... >}}`, `{{% ... %}}`, [Who]({{< ... >}}) +TokenIgnores = ({{[%<] .* [%>]}}.*?{{[%<] ?/.* [%>]}}), \ +(\[.+\]\({{< .+ >}}\)) + +# Exclude `{{< myshortcode `This is some HTML, ... >}}` +BlockIgnores = (?sm)^({{[%<] [^{]*? [%>]}})\n$, \ +(?s) *({{< highlight [^>]* ?>}}.*?{{< ?/ ?highlight >}}) diff --git a/.ci/vale/styles/Google/AMPM.yml b/.ci/vale/styles/Google/AMPM.yml new file mode 100644 index 000000000..fbdc6e4f8 --- /dev/null +++ b/.ci/vale/styles/Google/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'AM' or 'PM' (preceded by a space)." +link: 'https://developers.google.com/style/word-list' +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/.ci/vale/styles/Google/Acronyms.yml b/.ci/vale/styles/Google/Acronyms.yml new file mode 100644 index 000000000..f41af0189 --- /dev/null +++ b/.ci/vale/styles/Google/Acronyms.yml @@ -0,0 +1,64 @@ +extends: conditional +message: "Spell out '%s', if it's unfamiliar to the audience." +link: 'https://developers.google.com/style/abbreviations' +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 + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - URI + - URL + - USB + - UTF + - XML + - XSS + - YAML + - ZIP diff --git a/.ci/vale/styles/Google/Colons.yml b/.ci/vale/styles/Google/Colons.yml new file mode 100644 index 000000000..99363fbd4 --- /dev/null +++ b/.ci/vale/styles/Google/Colons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' should be in lowercase." +link: 'https://developers.google.com/style/colons' +nonword: true +level: warning +scope: sentence +tokens: + - ':\s[A-Z]' diff --git a/.ci/vale/styles/Google/Contractions.yml b/.ci/vale/styles/Google/Contractions.yml new file mode 100644 index 000000000..4f6fd5d48 --- /dev/null +++ b/.ci/vale/styles/Google/Contractions.yml @@ -0,0 +1,30 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/contractions' +level: suggestion +ignorecase: true +action: + name: replace +swap: + are not: aren't + cannot: can't + could not: couldn't + did not: didn't + do not: don't + does not: doesn't + has not: hasn't + have not: haven't + how is: how's + is not: isn't + it is: it's + should not: shouldn't + that is: that's + they are: they're + was not: wasn't + we are: we're + we have: we've + were not: weren't + what is: what's + when is: when's + where is: where's + will not: won't diff --git a/.ci/vale/styles/Google/DateFormat.yml b/.ci/vale/styles/Google/DateFormat.yml new file mode 100644 index 000000000..e9d227fa1 --- /dev/null +++ b/.ci/vale/styles/Google/DateFormat.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'July 31, 2016' format, not '%s'." +link: 'https://developers.google.com/style/dates-times' +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}' + - '\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}' diff --git a/.ci/vale/styles/Google/Ellipses.yml b/.ci/vale/styles/Google/Ellipses.yml new file mode 100644 index 000000000..1e070517b --- /dev/null +++ b/.ci/vale/styles/Google/Ellipses.yml @@ -0,0 +1,9 @@ +extends: existence +message: "In general, don't use an ellipsis." +link: 'https://developers.google.com/style/ellipses' +nonword: true +level: warning +action: + name: remove +tokens: + - '\.\.\.' diff --git a/.ci/vale/styles/Google/EmDash.yml b/.ci/vale/styles/Google/EmDash.yml new file mode 100644 index 000000000..1befe72aa --- /dev/null +++ b/.ci/vale/styles/Google/EmDash.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't put a space before or after a dash." +link: 'https://developers.google.com/style/dashes' +nonword: true +level: error +action: + name: edit + params: + - remove + - ' ' +tokens: + - '\s[—–]\s' diff --git a/.ci/vale/styles/Google/EnDash.yml b/.ci/vale/styles/Google/EnDash.yml new file mode 100644 index 000000000..b314dc4e9 --- /dev/null +++ b/.ci/vale/styles/Google/EnDash.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Use an em dash ('—') instead of '–'." +link: 'https://developers.google.com/style/dashes' +nonword: true +level: error +action: + name: edit + params: + - replace + - '-' + - '—' +tokens: + - '–' diff --git a/.ci/vale/styles/Google/Exclamation.yml b/.ci/vale/styles/Google/Exclamation.yml new file mode 100644 index 000000000..eea5fd24b --- /dev/null +++ b/.ci/vale/styles/Google/Exclamation.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use exclamation points in text." +link: 'https://developers.google.com/style/exclamation-points' +nonword: true +level: error +action: + name: remove +tokens: + - '\w+!(?:\s|$)' diff --git a/.ci/vale/styles/Google/FirstPerson.yml b/.ci/vale/styles/Google/FirstPerson.yml new file mode 100644 index 000000000..0b7b8828c --- /dev/null +++ b/.ci/vale/styles/Google/FirstPerson.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Avoid first-person pronouns such as '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +ignorecase: true +level: warning +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'm\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/.ci/vale/styles/Google/Gender.yml b/.ci/vale/styles/Google/Gender.yml new file mode 100644 index 000000000..c8486181d --- /dev/null +++ b/.ci/vale/styles/Google/Gender.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use '%s' as a gender-neutral pronoun." +link: 'https://developers.google.com/style/pronouns#gender-neutral-pronouns' +level: error +ignorecase: true +tokens: + - he/she + - s/he + - \(s\)he diff --git a/.ci/vale/styles/Google/GenderBias.yml b/.ci/vale/styles/Google/GenderBias.yml new file mode 100644 index 000000000..9e7019086 --- /dev/null +++ b/.ci/vale/styles/Google/GenderBias.yml @@ -0,0 +1,47 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: 'https://developers.google.com/style/inclusive-documentation' +ignorecase: true +level: error +action: + name: replace +swap: + (?:alumna|alumnus): graduate + (?:alumnae|alumni): graduates + air(?:m[ae]n|wom[ae]n): pilot(s) + anchor(?:m[ae]n|wom[ae]n): anchor(s) + authoress: author + camera(?:m[ae]n|wom[ae]n): camera operator(s) + chair(?:m[ae]n|wom[ae]n): chair(s) + congress(?:m[ae]n|wom[ae]n): member(s) of congress + door(?:m[ae]|wom[ae]n): concierge(s) + draft(?:m[ae]n|wom[ae]n): drafter(s) + fire(?:m[ae]n|wom[ae]n): firefighter(s) + fisher(?:m[ae]n|wom[ae]n): fisher(s) + fresh(?:m[ae]n|wom[ae]n): first-year student(s) + garbage(?:m[ae]n|wom[ae]n): waste collector(s) + lady lawyer: lawyer + ladylike: courteous + landlord: building manager + mail(?:m[ae]n|wom[ae]n): mail carriers + man and wife: husband and wife + man enough: strong enough + mankind: human kind + manmade: manufactured + manpower: personnel + men and girls: men and women + middle(?:m[ae]n|wom[ae]n): intermediary + news(?:m[ae]n|wom[ae]n): journalist(s) + ombuds(?:man|woman): ombuds + oneupmanship: upstaging + poetess: poet + police(?:m[ae]n|wom[ae]n): police officer(s) + repair(?:m[ae]n|wom[ae]n): technician(s) + sales(?:m[ae]n|wom[ae]n): salesperson or sales people + service(?:m[ae]n|wom[ae]n): soldier(s) + steward(?:ess)?: flight attendant + tribes(?:m[ae]n|wom[ae]n): tribe member(s) + waitress: waiter + woman doctor: doctor + woman scientist[s]?: scientist(s) + work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/.ci/vale/styles/Google/HeadingPunctuation.yml b/.ci/vale/styles/Google/HeadingPunctuation.yml new file mode 100644 index 000000000..b538be5b4 --- /dev/null +++ b/.ci/vale/styles/Google/HeadingPunctuation.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't put a period at the end of a heading." +link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' +nonword: true +level: warning +scope: heading +action: + name: edit + params: + - remove + - '.' +tokens: + - '[a-z0-9][.]\s*$' diff --git a/.ci/vale/styles/Google/Headings.yml b/.ci/vale/styles/Google/Headings.yml new file mode 100644 index 000000000..a53301338 --- /dev/null +++ b/.ci/vale/styles/Google/Headings.yml @@ -0,0 +1,29 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' +level: warning +scope: heading +match: $sentence +indicators: + - ':' +exceptions: + - Azure + - CLI + - Code + - Cosmos + - Docker + - Emmet + - gRPC + - I + - Kubernetes + - Linux + - macOS + - Marketplace + - MongoDB + - REPL + - Studio + - TypeScript + - URLs + - Visual + - VS + - Windows diff --git a/.ci/vale/styles/Google/Latin.yml b/.ci/vale/styles/Google/Latin.yml new file mode 100644 index 000000000..ca03b9154 --- /dev/null +++ b/.ci/vale/styles/Google/Latin.yml @@ -0,0 +1,11 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)(?=[\s,;])': for example + '\b(?:ie|i\.e\.)(?=[\s,;])': that is diff --git a/.ci/vale/styles/Google/LyHyphens.yml b/.ci/vale/styles/Google/LyHyphens.yml new file mode 100644 index 000000000..ac8f557a4 --- /dev/null +++ b/.ci/vale/styles/Google/LyHyphens.yml @@ -0,0 +1,14 @@ +extends: existence +message: "'%s' doesn't need a hyphen." +link: 'https://developers.google.com/style/hyphens' +level: error +ignorecase: false +nonword: true +action: + name: edit + params: + - replace + - '-' + - ' ' +tokens: + - '\s[^\s-]+ly-' diff --git a/.ci/vale/styles/Google/OptionalPlurals.yml b/.ci/vale/styles/Google/OptionalPlurals.yml new file mode 100644 index 000000000..f858ea6fe --- /dev/null +++ b/.ci/vale/styles/Google/OptionalPlurals.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't use plurals in parentheses such as in '%s'." +link: 'https://developers.google.com/style/plurals-parentheses' +level: error +nonword: true +action: + name: edit + params: + - remove + - '(s)' +tokens: + - '\b\w+\(s\)' diff --git a/.ci/vale/styles/Google/Ordinal.yml b/.ci/vale/styles/Google/Ordinal.yml new file mode 100644 index 000000000..d1ac7d27e --- /dev/null +++ b/.ci/vale/styles/Google/Ordinal.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Spell out all ordinal numbers ('%s') in text." +link: 'https://developers.google.com/style/numbers' +level: error +nonword: true +tokens: + - \d+(?:st|nd|rd|th) diff --git a/.ci/vale/styles/Google/OxfordComma.yml b/.ci/vale/styles/Google/OxfordComma.yml new file mode 100644 index 000000000..b9ba21ebb --- /dev/null +++ b/.ci/vale/styles/Google/OxfordComma.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: 'https://developers.google.com/style/commas' +scope: sentence +level: warning +tokens: + - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/.ci/vale/styles/Google/Parens.yml b/.ci/vale/styles/Google/Parens.yml new file mode 100644 index 000000000..3b8711d0c --- /dev/null +++ b/.ci/vale/styles/Google/Parens.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use parentheses judiciously." +link: 'https://developers.google.com/style/parentheses' +nonword: true +level: suggestion +tokens: + - '\(.+\)' diff --git a/.ci/vale/styles/Google/Passive.yml b/.ci/vale/styles/Google/Passive.yml new file mode 100644 index 000000000..3265890e5 --- /dev/null +++ b/.ci/vale/styles/Google/Passive.yml @@ -0,0 +1,184 @@ +extends: existence +link: 'https://developers.google.com/style/voice' +message: "In general, use active voice instead of passive voice ('%s')." +ignorecase: true +level: suggestion +raw: + - \b(am|are|were|being|is|been|was|be)\b\s* +tokens: + - '[\w]+ed' + - awoken + - beat + - become + - been + - begun + - bent + - beset + - bet + - bid + - bidden + - bitten + - bled + - blown + - born + - bought + - bound + - bred + - broadcast + - broken + - brought + - built + - burnt + - burst + - cast + - caught + - chosen + - clung + - come + - cost + - crept + - cut + - dealt + - dived + - done + - drawn + - dreamt + - driven + - drunk + - dug + - eaten + - fallen + - fed + - felt + - fit + - fled + - flown + - flung + - forbidden + - foregone + - forgiven + - forgotten + - forsaken + - fought + - found + - frozen + - given + - gone + - gotten + - ground + - grown + - heard + - held + - hidden + - hit + - hung + - hurt + - kept + - knelt + - knit + - known + - laid + - lain + - leapt + - learnt + - led + - left + - lent + - let + - lighted + - lost + - made + - meant + - met + - misspelt + - mistaken + - mown + - overcome + - overdone + - overtaken + - overthrown + - paid + - pled + - proven + - put + - quit + - read + - rid + - ridden + - risen + - run + - rung + - said + - sat + - sawn + - seen + - sent + - set + - sewn + - shaken + - shaven + - shed + - shod + - shone + - shorn + - shot + - shown + - shrunk + - shut + - slain + - slept + - slid + - slit + - slung + - smitten + - sold + - sought + - sown + - sped + - spent + - spilt + - spit + - split + - spoken + - spread + - sprung + - spun + - stolen + - stood + - stridden + - striven + - struck + - strung + - stuck + - stung + - stunk + - sung + - sunk + - swept + - swollen + - sworn + - swum + - swung + - taken + - taught + - thought + - thrived + - thrown + - thrust + - told + - torn + - trodden + - understood + - upheld + - upset + - wed + - wept + - withheld + - withstood + - woken + - won + - worn + - wound + - woven + - written + - wrung diff --git a/.ci/vale/styles/Google/Periods.yml b/.ci/vale/styles/Google/Periods.yml new file mode 100644 index 000000000..d24a6a6c0 --- /dev/null +++ b/.ci/vale/styles/Google/Periods.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use periods with acronyms or initialisms such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +level: error +nonword: true +tokens: + - '\b(?:[A-Z]\.){3,}' diff --git a/.ci/vale/styles/Google/Quotes.yml b/.ci/vale/styles/Google/Quotes.yml new file mode 100644 index 000000000..3cb6f1abd --- /dev/null +++ b/.ci/vale/styles/Google/Quotes.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Commas and periods go inside quotation marks." +link: 'https://developers.google.com/style/quotation-marks' +level: error +nonword: true +tokens: + - '"[^"]+"[.,?]' diff --git a/.ci/vale/styles/Google/Ranges.yml b/.ci/vale/styles/Google/Ranges.yml new file mode 100644 index 000000000..3ec045e77 --- /dev/null +++ b/.ci/vale/styles/Google/Ranges.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't add words such as 'from' or 'between' to describe a range of numbers." +link: 'https://developers.google.com/style/hyphens' +nonword: true +level: warning +tokens: + - '(?:from|between)\s\d+\s?-\s?\d+' diff --git a/.ci/vale/styles/Google/Semicolons.yml b/.ci/vale/styles/Google/Semicolons.yml new file mode 100644 index 000000000..bb8b85b42 --- /dev/null +++ b/.ci/vale/styles/Google/Semicolons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use semicolons judiciously." +link: 'https://developers.google.com/style/semicolons' +nonword: true +scope: sentence +level: suggestion +tokens: + - ';' diff --git a/.ci/vale/styles/Google/Slang.yml b/.ci/vale/styles/Google/Slang.yml new file mode 100644 index 000000000..63f4c248a --- /dev/null +++ b/.ci/vale/styles/Google/Slang.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Don't use internet slang abbreviations such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +tokens: + - 'tl;dr' + - ymmv + - rtfm + - imo + - fwiw diff --git a/.ci/vale/styles/Google/Spacing.yml b/.ci/vale/styles/Google/Spacing.yml new file mode 100644 index 000000000..66e45a6b7 --- /dev/null +++ b/.ci/vale/styles/Google/Spacing.yml @@ -0,0 +1,10 @@ +extends: existence +message: "'%s' should have one space." +link: 'https://developers.google.com/style/sentence-spacing' +level: error +nonword: true +action: + name: remove +tokens: + - '[a-z][.?!] {2,}[A-Z]' + - '[a-z][.?!][A-Z]' diff --git a/.ci/vale/styles/Google/Spelling.yml b/.ci/vale/styles/Google/Spelling.yml new file mode 100644 index 000000000..527ac07d3 --- /dev/null +++ b/.ci/vale/styles/Google/Spelling.yml @@ -0,0 +1,10 @@ +extends: existence +message: "In general, use American spelling instead of '%s'." +link: 'https://developers.google.com/style/spelling' +ignorecase: true +level: warning +tokens: + - '(?:\w+)nised?' + - 'colour' + - 'labour' + - 'centre' diff --git a/.ci/vale/styles/Google/Units.yml b/.ci/vale/styles/Google/Units.yml new file mode 100644 index 000000000..53522ab2d --- /dev/null +++ b/.ci/vale/styles/Google/Units.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Put a nonbreaking space between the number and the unit in '%s'." +link: "https://developers.google.com/style/units-of-measure" +nonword: true +level: error +tokens: + - \b\d+(?:B|kB|MB|GB|TB) + - \b\d+(?:ns|ms|s|min|h|d) diff --git a/.ci/vale/styles/Google/We.yml b/.ci/vale/styles/Google/We.yml new file mode 100644 index 000000000..c7ac7d362 --- /dev/null +++ b/.ci/vale/styles/Google/We.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Try to avoid using first-person plural like '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +level: warning +ignorecase: true +tokens: + - we + - we'(?:ve|re) + - ours? + - us + - let's diff --git a/.ci/vale/styles/Google/Will.yml b/.ci/vale/styles/Google/Will.yml new file mode 100644 index 000000000..128a91836 --- /dev/null +++ b/.ci/vale/styles/Google/Will.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Avoid using '%s'." +link: 'https://developers.google.com/style/tense' +ignorecase: true +level: warning +tokens: + - will diff --git a/.ci/vale/styles/Google/WordList.yml b/.ci/vale/styles/Google/WordList.yml new file mode 100644 index 000000000..0d675f237 --- /dev/null +++ b/.ci/vale/styles/Google/WordList.yml @@ -0,0 +1,81 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: "https://developers.google.com/style/word-list" +level: warning +ignorecase: false +action: + name: replace +swap: + "(?:API Console|dev|developer) key": API key + "(?:cell ?phone|smart ?phone)": phone|mobile phone + "(?:dev|developer|APIs) console": API console + "(?:e-mail|Email|E-mail)": email + "(?:file ?path|path ?name)": path + "(?:kill|terminate|abort)": stop|exit|cancel|end + "(?:OAuth ?2|Oauth)": OAuth 2.0 + "(?:ok|Okay)": OK|okay + "(?:WiFi|wifi)": Wi-Fi + '[\.]+apk': APK + '3\-D': 3D + 'Google (?:I\-O|IO)': Google I/O + "tap (?:&|and) hold": touch & hold + "un(?:check|select)": clear + above: preceding + account name: username + action bar: app bar + admin: administrator + Ajax: AJAX + a\.k\.a|aka: or|also known as + Android device: Android-powered device + android: Android + API explorer: APIs Explorer + application: app + approx\.: approximately + authN: authentication + authZ: authorization + autoupdate: automatically update + cellular data: mobile data + cellular network: mobile network + chapter: documents|pages|sections + check box: checkbox + check: select + CLI: command-line tool + click on: click|click in + Cloud: Google Cloud Platform|GCP + Container Engine: Kubernetes Engine + content type: media type + curated roles: predefined roles + data are: data is + Developers Console: Google API Console|API Console + disabled?: turn off|off + ephemeral IP address: ephemeral external IP address + fewer data: less data + file name: filename + firewalls: firewall rules + functionality: capability|feature + Google account: Google Account + Google accounts: Google Accounts + Googling: search with Google + grayed-out: unavailable + HTTPs: HTTPS + in order to: to + ingest: import|load + k8s: Kubernetes + long press: touch & hold + network IP address: internal IP address + omnibox: address bar + open-source: open source + overview screen: recents screen + regex: regular expression + SHA1: SHA-1|HAS-SHA1 + sign into: sign in to + sign-?on: single sign-on + static IP address: static external IP address + stylesheet: style sheet + synch: sync + tablename: table name + tablet: device + touch: tap + url: URL + vs\.: versus + World Wide Web: web diff --git a/.ci/vale/styles/Google/meta.json b/.ci/vale/styles/Google/meta.json new file mode 100644 index 000000000..a5da2a848 --- /dev/null +++ b/.ci/vale/styles/Google/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Google/releases.atom", + "vale_version": ">=1.0.0" +} diff --git a/.ci/vale/styles/Google/vocab.txt b/.ci/vale/styles/Google/vocab.txt new file mode 100644 index 000000000..e69de29bb diff --git a/.ci/vale/styles/InfluxDataDocs/Branding.yml b/.ci/vale/styles/InfluxDataDocs/Branding.yml new file mode 100644 index 000000000..6bc5dc898 --- /dev/null +++ b/.ci/vale/styles/InfluxDataDocs/Branding.yml @@ -0,0 +1,9 @@ +extends: substitution +message: Use '%s' instead of '%s' +level: warning +ignorecase: true +# swap maps tokens in form of bad: good +swap: + # NOTE: The left-hand (bad) side can match the right-hand (good) side; Vale + # will ignore any alerts that match the intended form. + "java[ -]?scripts?": JavaScript \ No newline at end of file diff --git a/.ci/vale/styles/InfluxDataDocs/Capitalization.yml b/.ci/vale/styles/InfluxDataDocs/Capitalization.yml new file mode 100644 index 000000000..16456f635 --- /dev/null +++ b/.ci/vale/styles/InfluxDataDocs/Capitalization.yml @@ -0,0 +1,379 @@ +extends: capitalization +message: "'%s' should be in sentence case" +level: warning +scope: heading +# $title, $sentence, $lower, $upper, or a pattern. +match: $sentence +style: AP # AP or Chicago; only applies when match is set to $title. +exceptions: +# SQL_INFO_SQL_KEYWORDS +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info + - absolute + - action + - add + - all + - allocate + - alter + - and + - any + - are + - as + - asc + - assertion + - at + - authorization + - avg + - begin + - between + - bit + - bit_length + - both + - by + - cascade + - cascaded + - case + - cast + - catalog + - char + - char_length + - character + - character_length + - check + - close + - coalesce + - collate + - collation + - column + - commit + - connect + - connection + - constraint + - constraints + - continue + - convert + - corresponding + - count + - create + - cross + - current + - current_date + - current_time + - current_timestamp + - current_user + - cursor + - date + - day + - deallocate + - dec + - decimal + - declare + - default + - deferrable + - deferred + - delete + - desc + - describe + - descriptor + - diagnostics + - disconnect + - distinct + - domain + - double + - drop + - else + - end + - end-exec + - escape + - except + - exception + - exec + - execute + - exists + - external + - extract + - false + - fetch + - first + - float + - for + - foreign + - found + - from + - full + - get + - global + - go + - goto + - grant + - group + - having + - hour + - identity + - immediate + - in + - indicator + - initially + - inner + - input + - insensitive + - insert + - int + - integer + - intersect + - interval + - into + - is + - isolation + - join + - key + - language + - last + - leading + - left + - level + - like + - local + - lower + - match + - max + - min + - minute + - module + - month + - names + - national + - natural + - nchar + - next + - no + - not + - null + - nullif + - numeric + - octet_length + - of + - on + - only + - open + - option + - or + - order + - outer + - output + - overlaps + - pad + - partial + - position + - precision + - prepare + - preserve + - primary + - prior + - privileges + - procedure + - public + - read + - real + - references + - relative + - restrict + - revoke + - right + - rollback + - rows + - schema + - scroll + - second + - section + - select + - session + - session_user + - set + - size + - smallint + - some + - space + - sql + - sqlcode + - sqlerror + - sqlstate + - substring + - sum + - system_user + - table + - temporary + - then + - time + - timestamp + - timezone_hour + - timezone_minute + - to + - trailing + - transaction + - translate + - translation + - trim + - true + - union + - unique + - unknown + - update + - upper + - usage + - user + - using + - value + - values + - varchar + - varying + - view + - when + - whenever + - where + - with + - work + - write + - year + - zone + # SQL_INFO_NUMERIC_FUNCTIONS + # Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info + - abs + - acos + - asin + - atan + - atan2 + - ceil + - cos + - exp + - floor + - ln + - log + - log10 + - log2 + - pow + - power + - round + - signum + - sin + - sqrt + - tan + - trunc + - + # SQL_INFO_STRING_FUNCTIONS + # Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info + - arrow_typeof + - ascii + - bit_length + - btrim + - char_length + - character_length + - chr + - concat + - concat_ws + - digest + - from_unixtime + - initcap + - left + - length + - lower + - lpad + - ltrim + - md5 + - octet_length + - random + - regexp_match + - regexp_replace + - repeat + - replace + - reverse + - right + - rpad + - rtrim + - sha224 + - sha256 + - sha384 + - sha512 + - split_part + - starts_with + - strpos + - substr + - to_hex + - translate + - trim + - upper + - uuid + # SQL_INFO_DATE_TIME_FUNCTIONS + # Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info + - current_date + - current_time + - date_bin + - date_part + - date_trunc + - datepart + - datetrunc + - from_unixtime + - now + - to_timestamp + - to_timestamp_micros + - to_timestamp_millis + - to_timestamp_seconds + # SQL_INFO_SYSTEM_FUNCTIONS + # Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info + - array + - arrow_typeof + - struct + # is_scalar_math_function + # Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/influxdb_influxql_parser/src/functions.rs + - abs + - sin + - cos + - tan + - asin + - acos + - atan + - atan2 + - exp + - log + - ln + - log2 + - log10 + - sqrt + - pow + - floor + - ceil + - round + # is_aggregate_function + # Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/influxdb_influxql_parser/src/functions.rs + - cumulative_sum + - derivative + - difference + - elapsed + - moving_average + - non_negative_derivative + - non_negative_difference + - bottom + - first + - last + - max + - min + - percentile + - sample + - top + - count + - integral + - mean + - median + - mode + - spread + - stddev + - sum + - holt_winters + - holt_winters_with_fit + - chande_momentum_oscillator + - exponential_moving_average + - double_exponential_moving_average + - kaufmans_efficiency_ratio + - kaufmans_adaptive_moving_average + - triple_exponential_moving_average + - triple_exponential_derivative + - relative_strength_index \ No newline at end of file diff --git a/.ci/vale/styles/InfluxDataDocs/Spelling.yml b/.ci/vale/styles/InfluxDataDocs/Spelling.yml new file mode 100644 index 000000000..d1f3a6249 --- /dev/null +++ b/.ci/vale/styles/InfluxDataDocs/Spelling.yml @@ -0,0 +1,6 @@ +extends: spelling +message: "Did you really mean '%s'?" +level: error +ignore: + # Located at StylesPath/ignore1.txt + - InfluxDataDocs/Terms/query-functions.txt diff --git a/.ci/vale/styles/InfluxDataDocs/Terms/query-functions.txt b/.ci/vale/styles/InfluxDataDocs/Terms/query-functions.txt new file mode 100644 index 000000000..ba8b6d335 --- /dev/null +++ b/.ci/vale/styles/InfluxDataDocs/Terms/query-functions.txt @@ -0,0 +1,376 @@ +# SQL_INFO_SQL_KEYWORDS +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info +absolute +action +add +all +allocate +alter +and +any +are +as +asc +assertion +at +authorization +avg +begin +between +bit +bit_length +both +by +cascade +cascaded +case +cast +catalog +char +char_length +character +character_length +check +close +coalesce +collate +collation +column +commit +connect +connection +constraint +constraints +continue +convert +corresponding +count +create +cross +current +current_date +current_time +current_timestamp +current_user +cursor +date +day +deallocate +dec +decimal +declare +default +deferrable +deferred +delete +desc +describe +descriptor +diagnostics +disconnect +distinct +domain +double +drop +else +end +end-exec +escape +except +exception +exec +execute +exists +external +extract +false +fetch +first +float +for +foreign +found +from +full +get +global +go +goto +grant +group +having +hour +identity +immediate +in +indicator +initially +inner +input +insensitive +insert +int +integer +intersect +interval +into +is +isolation +join +key +language +last +leading +left +level +like +local +lower +match +max +min +minute +module +month +names +national +natural +nchar +next +no +not +null +nullif +numeric +octet_length +of +on +only +open +option +or +order +outer +output +overlaps +pad +partial +position +precision +prepare +preserve +primary +prior +privileges +procedure +public +read +real +references +relative +restrict +revoke +right +rollback +rows +schema +scroll +second +section +select +session +session_user +set +size +smallint +some +space +sql +sqlcode +sqlerror +sqlstate +substring +sum +system_user +table +temporary +then +time +timestamp +timezone_hour +timezone_minute +to +trailing +transaction +translate +translation +trim +true +union +unique +unknown +update +upper +usage +user +using +value +values +varchar +varying +view +when +whenever +where +with +work +write +year +zone + +# SQL_INFO_NUMERIC_FUNCTIONS +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info +abs +acos +asin +atan +atan2 +ceil +cos +exp +floor +ln +log +log10 +log2 +pow +power +round +signum +sin +sqrt +tan +trunc + +# SQL_INFO_STRING_FUNCTIONS +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info +arrow_typeof +ascii +bit_length +btrim +char_length +character_length +chr +concat +concat_ws +digest +from_unixtime +initcap +left +length +lower +lpad +ltrim +md5 +octet_length +random +regexp_match +regexp_replace +repeat +replace +reverse +right +rpad +rtrim +sha224 +sha256 +sha384 +sha512 +split_part +starts_with +strpos +substr +to_hex +translate +trim +upper +uuid + +# SQL_INFO_DATE_TIME_FUNCTIONS +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info +current_date +current_time +date_bin +date_part +date_trunc +datepart +datetrunc +from_unixtime +now +to_timestamp +to_timestamp_micros +to_timestamp_millis +to_timestamp_seconds + +# SQL_INFO_SYSTEM_FUNCTIONS +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/flightsql/src/sql_info +array +arrow_typeof +struct + +# is_scalar_math_function +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/influxdb_influxql_parser/src/functions.rs +abs +sin +cos +tan +asin +acos +atan +atan2 +exp +log +ln +log2 +log10 +sqrt +pow +floor +ceil +round + +# is_aggregate_function +# Source: https://github.com/influxdata/influxdb_iox/blob/4f9c901dcfece5fcc4d17cfecb6ec45a0dccda5a/influxdb_influxql_parser/src/functions.rs +cumulative_sum +derivative +difference +elapsed +moving_average +non_negative_derivative +non_negative_difference +bottom +first +last +max +min +percentile +sample +top +count +integral +mean +median +mode +spread +stddev +sum +holt_winters +holt_winters_with_fit +chande_momentum_oscillator +exponential_moving_average +double_exponential_moving_average +kaufmans_efficiency_ratio +kaufmans_adaptive_moving_average +triple_exponential_moving_average +triple_exponential_derivative +relative_strength_index \ No newline at end of file diff --git a/.ci/vale/styles/Vocab/Cloud-Dedicated/accept.txt b/.ci/vale/styles/Vocab/Cloud-Dedicated/accept.txt new file mode 100644 index 000000000..e69de29bb diff --git a/.ci/vale/styles/Vocab/Cloud-Dedicated/reject.txt b/.ci/vale/styles/Vocab/Cloud-Dedicated/reject.txt new file mode 100644 index 000000000..b2cc64e95 --- /dev/null +++ b/.ci/vale/styles/Vocab/Cloud-Dedicated/reject.txt @@ -0,0 +1,4 @@ +API token +bucket name +Cloud Serverless +cloud-serverless diff --git a/.ci/vale/styles/Vocab/Cloud-Serverless/accept.txt b/.ci/vale/styles/Vocab/Cloud-Serverless/accept.txt new file mode 100644 index 000000000..e69de29bb diff --git a/.ci/vale/styles/Vocab/Cloud-Serverless/reject.txt b/.ci/vale/styles/Vocab/Cloud-Serverless/reject.txt new file mode 100644 index 000000000..f14494ed2 --- /dev/null +++ b/.ci/vale/styles/Vocab/Cloud-Serverless/reject.txt @@ -0,0 +1,4 @@ +Cloud Dedicated +cloud-dedicated +database name +database token \ No newline at end of file diff --git a/.ci/vale/styles/Vocab/InfluxData/accept.txt b/.ci/vale/styles/Vocab/InfluxData/accept.txt new file mode 100644 index 000000000..e1939b3f2 --- /dev/null +++ b/.ci/vale/styles/Vocab/InfluxData/accept.txt @@ -0,0 +1,55 @@ +\b.*_.*\b +Anaconda +APIs? +Arrow +authToken +AuthToken +bundlers? +[Cc]hronograf +CLI +[Cc]loud +cloud-dedicated +Cloud Dedicated +cloud-name +cloud-serverless +Cloud Serverless +conda +Data Explorer +[Dd]ownsampl.* +enum +Flight +FlightQuery +Grafana +hostname +hostUrl +hostURL +HostURL +influxctl +[Ii]nflux[Dd]ata +influxdb? +InfluxDB +influxql +InfluxQL +influx3 +iox +IOx +Kapacitor +locf +namespace +noaa +NOAA +pandas +pyarrow +Py.*\b +pyinflux +rearchitect(ed)? +retention_policy +rp +[Ss]erverless +stdout +Superset +svg +[Tt]elegraf +unescaped +venv +Webpack \ No newline at end of file diff --git a/.ci/vale/styles/Vocab/InfluxData/reject.txt b/.ci/vale/styles/Vocab/InfluxData/reject.txt new file mode 100644 index 000000000..f4052edd7 --- /dev/null +++ b/.ci/vale/styles/Vocab/InfluxData/reject.txt @@ -0,0 +1 @@ +Pandas \ No newline at end of file diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 000000000..1c05eaed6 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,12 @@ +StylesPath = ".ci/vale/styles" + +Vocab = InfluxData + +MinAlertLevel = warning + +Packages = Google, Hugo + +[*.md] +BasedOnStyles = InfluxDataDocs, Google + +Google.Headings = NO \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index fe8bf5b46..e0459fb0f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,5 +14,5 @@ "Signup", "westeurope", "xsmall" - ] + ], } \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/.vale.ini b/content/influxdb/cloud-dedicated/.vale.ini new file mode 100644 index 000000000..d1e39fcf6 --- /dev/null +++ b/content/influxdb/cloud-dedicated/.vale.ini @@ -0,0 +1,12 @@ +StylesPath = "../../../.ci/vale/styles" + +Vocab = InfluxData, Cloud-Dedicated + +MinAlertLevel = warning + +Packages = Google, Hugo + +[*.md] +BasedOnStyles = InfluxDataDocs, Google + +Google.Headings = NO \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/.vale.ini b/content/influxdb/cloud-serverless/.vale.ini new file mode 100644 index 000000000..4a831e5e8 --- /dev/null +++ b/content/influxdb/cloud-serverless/.vale.ini @@ -0,0 +1,12 @@ +StylesPath = "../../../.ci/vale/styles" + +Vocab = InfluxData, Cloud-Serverless + +MinAlertLevel = warning + +Packages = Google, Hugo + +[*.md] +BasedOnStyles = InfluxDataDocs, Google + +Google.Headings = NO \ No newline at end of file