diff --git a/.github/vale/.vale-config/0-Hugo.ini b/.github/vale/.vale-config/0-Hugo.ini new file mode 100644 index 0000000000..3b014081df --- /dev/null +++ b/.github/vale/.vale-config/0-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/.github/vale/Docker/Avoid.yml b/.github/vale/Docker/Avoid.yml index 13f4b5ffc6..b648bfffaf 100644 --- a/.github/vale/Docker/Avoid.yml +++ b/.github/vale/Docker/Avoid.yml @@ -3,4 +3,5 @@ message: "Consider removing '%s'." ignorecase: true level: warning tokens: - - Please \ No newline at end of file + - Please + - At this time diff --git a/.github/vale/Docker/Bold.yml b/.github/vale/Docker/Bold.yml deleted file mode 100644 index e0421278af..0000000000 --- a/.github/vale/Docker/Bold.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Checks for use of bold that doesn't start with a capital letter -# which might indicate a reference to something other than a UI label -extends: existence -message: "Only use bold for UI elements." -link: https://docs.docker.com/contribute/checklist/ -level: suggestion -scope: strong -raw: "^[^A-Z].*" diff --git a/.github/vale/Docker/CodeIndentation.yml b/.github/vale/Docker/CodeIndentation.yml deleted file mode 100644 index 21ce3a5d59..0000000000 --- a/.github/vale/Docker/CodeIndentation.yml +++ /dev/null @@ -1,12 +0,0 @@ -extends: existence -message: "Indent nested code blocks by 3 spaces and double-nested code blocks by 5 spaces." -link: https://docs.docker.com/contribute/style/formatting/#best-practice-for-commands -level: warning -scope: raw -# check for 1, 2, 4, 6 or more spaces at start of line before code fence (```) -# If not indented by 3 spaces at first level or 5 spaces at second level, then a hidden space is inserted and copied by the copy code feature. -raw: - - '(?m:^[ ]{1}\`\`\`)|' - - '(?m:^[ ]{2}\`\`\`)|' - - '(?m:^[ ]{4}\`\`\`)|' - - '(?m:^[ ]{6,}\`\`\`)' \ No newline at end of file diff --git a/.github/vale/Docker/Contractions.yml b/.github/vale/Docker/Contractions.yml index 54b1af1c36..5cb6ad02a3 100644 --- a/.github/vale/Docker/Contractions.yml +++ b/.github/vale/Docker/Contractions.yml @@ -22,7 +22,7 @@ swap: should not: shouldn't - 'that is(?!\.)': that's + 'that is(?!\.,)': that's 'that''s(?=\.)': that is 'they are(?!\.)': they're diff --git a/.github/vale/Docker/Currently.yml b/.github/vale/Docker/Currently.yml deleted file mode 100644 index a03d983052..0000000000 --- a/.github/vale/Docker/Currently.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "Avoid using words like '%s', the docs should describe the product as is." -link: https://docs.docker.com/contribute/style/recommended-words/ -level: warning -ignorecase: true -tokens: - - At this time - - Currently \ No newline at end of file diff --git a/.github/vale/Docker/GenericCTA.yml b/.github/vale/Docker/GenericCTA.yml index 1d588c277a..4f4b0bfa92 100644 --- a/.github/vale/Docker/GenericCTA.yml +++ b/.github/vale/Docker/GenericCTA.yml @@ -2,9 +2,7 @@ extends: existence message: "Avoid generic calls to action: '%s'" link: https://docs.docker.com/contribute/style/formatting/#links level: warning -scope: link +scope: raw ignorecase: true -tokens: - - click here - - find out more - - learn more +raw: + - \[(click here|(find out|learn) more)\] diff --git a/.github/vale/Docker/Italics.yml b/.github/vale/Docker/Italics.yml deleted file mode 100644 index 6aa2f0a5df..0000000000 --- a/.github/vale/Docker/Italics.yml +++ /dev/null @@ -1,20 +0,0 @@ -# This catch-all pattern uses raw which means it -# will match in code, too. Kept for reference. -# -# extends: existence -# message: Use italics sparingly. -# level: suggestion -# scope: raw -# raw: -# - '[\*_]' -# - '.*?' -# - '[\*_]' -# - '(?=[$\s])' -extends: existence -message: Use italics sparingly. -level: suggestion -scope: emphasis -tokens: - - "[^-]+" -# This is strange, but vale would match front matter section -# as italics if I just used a .* pattern diff --git a/.github/vale/Docker/LinkLength.yml b/.github/vale/Docker/LinkLength.yml deleted file mode 100644 index 85c1de98e0..0000000000 --- a/.github/vale/Docker/LinkLength.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: occurrence -message: "Try to keep link text short (< 5 words)." -scope: link -link: https://docs.docker.com/contribute/style/formatting/#links -level: suggestion -max: 5 -token: \b(\w+)\b diff --git a/.github/vale/Docker/LinkPunctuation.yml b/.github/vale/Docker/LinkPunctuation.yml deleted file mode 100644 index 118c7c191a..0000000000 --- a/.github/vale/Docker/LinkPunctuation.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "Don't use end punctuation in links." -link: https://docs.docker.com/contribute/style/formatting/#links -nonword: true -level: warning -scope: link -tokens: - - '[a-z0-9][.?!](?:\s|$)' diff --git a/.github/vale/Docker/OxfordComma.yml b/.github/vale/Docker/OxfordComma.yml index 8344e91d64..1b121ec09e 100644 --- a/.github/vale/Docker/OxfordComma.yml +++ b/.github/vale/Docker/OxfordComma.yml @@ -4,4 +4,4 @@ scope: sentence level: suggestion nonword: true tokens: - - '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]' + - '(?:[^\s,]+,){1,}\s\w+\s(?:and|or)\s\w+[.?!]' diff --git a/.github/vale/Docker/SentenceCase.yml b/.github/vale/Docker/SentenceCase.yml index c61c638386..17c2b339ed 100644 --- a/.github/vale/Docker/SentenceCase.yml +++ b/.github/vale/Docker/SentenceCase.yml @@ -6,4 +6,3 @@ match: $sentence exceptions: - Vocab/Docker/accept.txt - Vocab/Technology/accept.txt - - Vocab/Industry/accept.txt diff --git a/.github/vale/Docker/Substitute.yml b/.github/vale/Docker/Substitute.yml index a7b4fca9ec..dcf8891b4d 100644 --- a/.github/vale/Docker/Substitute.yml +++ b/.github/vale/Docker/Substitute.yml @@ -6,11 +6,19 @@ level: suggestion action: name: replace swap: + '(?