diff --git a/.github/vale/Docker/Bold.yml b/.github/vale/Docker/Bold.yml new file mode 100644 index 0000000000..e0421278af --- /dev/null +++ b/.github/vale/Docker/Bold.yml @@ -0,0 +1,8 @@ +# 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/Callouts.yml b/.github/vale/Docker/Callouts.yml index a5b7c21c3b..47bcfe87fe 100644 --- a/.github/vale/Docker/Callouts.yml +++ b/.github/vale/Docker/Callouts.yml @@ -1,3 +1,6 @@ +# Checks that a callout block is followed by a liquid tag +# (Doesn't actually check that there is a well-formed liquid +# tag, just checks that it is not an empty line.) extends: existence message: "Use a liquid tag for 'Important' or 'Warning' callouts." link: https://docs.docker.com/contribute/components/call-outs/ @@ -5,8 +8,8 @@ level: warning nonword: true scope: raw raw: - - '[:blank:]*\> .*?' + - '[:blank:]*\>.*?' - "(?i)(?:important|warning|danger|caution)(?-i)" - '.*\n' - - '(?:[:blank:]*\>.*\n)+?' - - '[:blank:]*(?!\{: \.(important|warning))' + - '(?:\s*\>.*?\n)+?' + - '\s*\n' diff --git a/.github/vale/Docker/ComplexWords.yml b/.github/vale/Docker/ComplexWords.yml index add7baf389..7c4fb90cd3 100644 --- a/.github/vale/Docker/ComplexWords.yml +++ b/.github/vale/Docker/ComplexWords.yml @@ -3,8 +3,6 @@ message: "Consider using '%s' instead of '%s'." ignorecase: true level: suggestion swap: - "approximate(?:ly)?": about - abundance: plenty accelerate: speed up accentuate: stress accompany: go with @@ -15,8 +13,6 @@ swap: accurate: right|exact acquiesce: agree acquire: get|buy - additional: more|extra - address: discuss addressees: you adjacent to: next to adjustment: change @@ -26,33 +22,23 @@ swap: aggregate: total aircraft: plane alleviate: ease - allocate: assign|divide - alternatively: or alternatives: choices|options ameliorate: improve - amend: change - anticipate: expect apparent: clear|plain ascertain: discover|find out assistance: help attain: meet - attempt: try - authorize: allow belated: late bestow: give cease: stop|end - collaborate: work together commence: begin compensate: pay - component: part comprise: form|include - concept: idea concerning: about confer: give|award consequently: so consolidate: merge constitutes: forms - contains: has convene: meet demonstrate: show|prove depart: leave @@ -77,21 +63,11 @@ swap: facilitate: ease females: women finalize: complete|finish - frequently: often - identical: same - incorrect: wrong - indication: sign - initiate: start|begin itemized: listed jeopardize: risk liaise: work with|partner with - maintain: keep|support methodology: method - modify: change - monitor: check|watch - multiple: many necessitate: cause - notify: tell numerous: many objective: aim|goal obligate: bind|compel @@ -99,16 +75,11 @@ swap: permit: let portion: part possess: own - previous: earlier - previously: before - prioritize: rank procure: buy - provide: give|offer purchase: buy relocate: move solicit: request state-of-the-art: latest - subsequent: later|next substantial: large sufficient: enough terminate: end diff --git a/.github/vale/Docker/Italics.yml b/.github/vale/Docker/Italics.yml new file mode 100644 index 0000000000..6aa2f0a5df --- /dev/null +++ b/.github/vale/Docker/Italics.yml @@ -0,0 +1,20 @@ +# 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/SentenceCase.yml b/.github/vale/Docker/SentenceCase.yml index 148ab96766..c61c638386 100644 --- a/.github/vale/Docker/SentenceCase.yml +++ b/.github/vale/Docker/SentenceCase.yml @@ -3,8 +3,6 @@ message: "Use sentence case for headings: '%s'." level: warning scope: heading match: $sentence -indicators: - - ":" exceptions: - Vocab/Docker/accept.txt - Vocab/Technology/accept.txt diff --git a/.github/vale/Docker/SentenceLength.yml b/.github/vale/Docker/SentenceLength.yml index d08241cd16..06f0112fa9 100644 --- a/.github/vale/Docker/SentenceLength.yml +++ b/.github/vale/Docker/SentenceLength.yml @@ -3,5 +3,5 @@ message: "Write short, concise sentences." scope: sentence link: https://docs.docker.com/contribute/checklist/ level: warning -max: 25 +max: 30 token: \b(\w+)\b