Skip to content

Commit

Permalink
Introduce Vale to lint documentation (#585)
Browse files Browse the repository at this point in the history
Obsolete many human-written review comments related to typos and text
style issues. Instead, a bot autocomments on such issues now.

The implicit style guide introduced in this commit is based on
Microsoft's style guide (https://learn.microsoft.com/en-us/style-guide/welcome/),
with a few enhancements that aim to improve readability and conciseness.

This commit fixes a large number of typos. Warnings and suggestions are
not handled in CI yet and need to be addressed in subsequent commits.
We might need to make adjustments to the finer-grained warnings, so
except for hard errors everythinng else is disabled at the moment.
  • Loading branch information
aaronmondal committed Feb 13, 2024
1 parent 4e7d68b commit 745b0d6
Show file tree
Hide file tree
Showing 84 changed files with 5,347 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Expand Up @@ -7,7 +7,7 @@ Fixes # (issue)

## Type of change

Please delete options that are not relevant.
Please delete options that aren't relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
Expand Down
9 changes: 9 additions & 0 deletions .github/styles/Microsoft/AMPM.yml
@@ -0,0 +1,9 @@
extends: existence
message: Use 'AM' or 'PM' (preceded by a space).
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms
level: error
nonword: true
tokens:
- '\d{1,2}[AP]M'
- '\d{1,2} ?[ap]m'
- '\d{1,2} ?[aApP]\.[mM]\.'
25 changes: 25 additions & 0 deletions .github/styles/Microsoft/Accessibility.yml
@@ -0,0 +1,25 @@
extends: existence
message: "Don't use language (such as '%s') that defines people by their disability."
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms
level: suggestion
ignorecase: true
tokens:
- a victim of
- able-bodied
- affected by
- an epileptic
- crippled
- disabled
- dumb
- handicapped
- handicaps
- healthy
- lame
- maimed
- missing a limb
- mute
- normal
- sight-impaired
- stricken with
- suffers from
- vision-impaired
64 changes: 64 additions & 0 deletions .github/styles/Microsoft/Acronyms.yml
@@ -0,0 +1,64 @@
extends: conditional
message: "'%s' has no definition."
link: https://docs.microsoft.com/en-us/style-guide/acronyms
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
270 changes: 270 additions & 0 deletions .github/styles/Microsoft/Adverbs.yml
@@ -0,0 +1,270 @@
extends: existence
message: "Consider removing '%s'."
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences
ignorecase: true
level: warning
action:
name: remove
tokens:
- abnormally
- absentmindedly
- accidentally
- adventurously
- anxiously
- arrogantly
- awkwardly
- bashfully
- beautifully
- bitterly
- bleakly
- blindly
- blissfully
- boastfully
- boldly
- bravely
- briefly
- brightly
- briskly
- broadly
- busily
- calmly
- carefully
- carelessly
- cautiously
- cheerfully
- cleverly
- closely
- coaxingly
- colorfully
- continually
- coolly
- courageously
- crossly
- cruelly
- curiously
- daintily
- dearly
- deceivingly
- deeply
- defiantly
- deliberately
- delightfully
- diligently
- dimly
- doubtfully
- dreamily
- easily
- elegantly
- energetically
- enormously
- enthusiastically
- excitedly
- extremely
- fairly
- faithfully
- famously
- ferociously
- fervently
- fiercely
- fondly
- foolishly
- fortunately
- frankly
- frantically
- freely
- frenetically
- frightfully
- furiously
- generally
- generously
- gently
- gladly
- gleefully
- gracefully
- gratefully
- greatly
- greedily
- happily
- hastily
- healthily
- heavily
- helplessly
- honestly
- hopelessly
- hungrily
- innocently
- inquisitively
- intensely
- intently
- interestingly
- inwardly
- irritably
- jaggedly
- jealously
- jovially
- joyfully
- joyously
- jubilantly
- judgmentally
- justly
- keenly
- kiddingly
- kindheartedly
- knavishly
- knowingly
- knowledgeably
- lazily
- lightly
- limply
- lively
- loftily
- longingly
- loosely
- loudly
- lovingly
- loyally
- madly
- majestically
- meaningfully
- mechanically
- merrily
- miserably
- mockingly
- mortally
- mysteriously
- naturally
- nearly
- neatly
- nervously
- nicely
- noisily
- obediently
- obnoxiously
- oddly
- offensively
- optimistically
- overconfidently
- painfully
- partially
- patiently
- perfectly
- playfully
- politely
- poorly
- positively
- potentially
- powerfully
- promptly
- properly
- punctually
- quaintly
- queasily
- queerly
- questionably
- quickly
- quietly
- quirkily
- quizzically
- randomly
- rapidly
- rarely
- readily
- really
- reassuringly
- recklessly
- regularly
- reluctantly
- repeatedly
- reproachfully
- restfully
- righteously
- rightfully
- rigidly
- roughly
- rudely
- safely
- scarcely
- scarily
- searchingly
- sedately
- seemingly
- selfishly
- separately
- seriously
- shakily
- sharply
- sheepishly
- shrilly
- shyly
- silently
- sleepily
- slowly
- smoothly
- softly
- solemnly
- solidly
- speedily
- stealthily
- sternly
- strictly
- suddenly
- supposedly
- surprisingly
- suspiciously
- sweetly
- swiftly
- sympathetically
- tenderly
- tensely
- terribly
- thankfully
- thoroughly
- thoughtfully
- tightly
- tremendously
- triumphantly
- truthfully
- ultimately
- unabashedly
- unaccountably
- unbearably
- unethically
- unexpectedly
- unfortunately
- unimpressively
- unnaturally
- unnecessarily
- urgently
- usefully
- uselessly
- utterly
- vacantly
- vaguely
- vainly
- valiantly
- vastly
- verbally
- very
- viciously
- victoriously
- violently
- vivaciously
- voluntarily
- warmly
- weakly
- wearily
- wetly
- wholly
- wildly
- willfully
- wisely
- woefully
- wonderfully
- worriedly
- yawningly
- yearningly
- yieldingly
- youthfully
- zealously
- zestfully
- zestily
11 changes: 11 additions & 0 deletions .github/styles/Microsoft/Auto.yml
@@ -0,0 +1,11 @@
extends: existence
message: "In general, don't hyphenate '%s'."
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/auto
ignorecase: true
level: error
action:
name: convert
params:
- simple
tokens:
- 'auto-\w+'

0 comments on commit 745b0d6

Please sign in to comment.