Skip to content

Commit 32f6816

Browse files
committed
Add more linting
1 parent f7f9698 commit 32f6816

File tree

185 files changed

+4349
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+4349
-333
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Based on: https://github.com/errata-ai/Microsoft/blob/master/Microsoft/Accessibility.yml
2+
3+
extends: existence
4+
message: "Don't use language (such as '%s') that defines people by their disability."
5+
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms
6+
level: suggestion
7+
ignorecase: true
8+
tokens:
9+
- a victim of
10+
- able-bodied
11+
- affected by
12+
- an epileptic
13+
- crippled
14+
- disabled
15+
- dumb
16+
- handicapped
17+
- handicaps
18+
- healthy
19+
- lame
20+
- maimed
21+
- missing a limb
22+
- mute
23+
- normal
24+
- sight-impaired
25+
- stricken with
26+
- suffers from
27+
- vision-impaired
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
extends: existence
2+
message: "You can remove most adverbs. Use your best judgment."
3+
link: 'https://github.com/rackerlabs/docs-style-guide/blob/master/style-guide/writing/write-clear-concise-sentences-paragraphs.rst'
4+
level: suggestion
5+
ignorecase: true
6+
scope: sentence
7+
nonword: false
8+
tokens:
9+
- '\b(\w+ly)'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
extends: existence
2+
message: "Avoid using the antecedent '%s' at the beginning of sentences or clauses."
3+
link: 'https://github.com/rackerlabs/docs-style-guide/blob/master/style-guide/writing/use-pronouns-carefully.rst'
4+
level: suggestion
5+
ignorecase: false
6+
scope: sentence
7+
nonword: true
8+
tokens:
9+
- '(\sIt is)'
10+
- '(\sThis)'
11+
- '(\sThere (is|are))'
12+
- '(\sThat)'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Based on https://github.com/errata-ai/Google/blob/master/Google/We.yml
2+
3+
extends: existence
4+
message: "Avoid first-person pronouns such as '%s' where possible."
5+
link: 'https://github.com/rackerlabs/docs-style-guide/blob/master/style-guide/writing/write-to-the-user.rst'
6+
ignorecase: true
7+
level: warning
8+
nonword: true
9+
tokens:
10+
- (?:^|\s)I\s
11+
- (?:^|\s)I,\s
12+
- \bI'm\b
13+
- \bI've\b
14+
- \bme\b
15+
- \bmy\b
16+
- \bmine\b
17+
- (?:^|\s)We\s
18+
- (?:^|\s)We,\s
19+
- \bWe're\b
20+
- \bWe've\b
21+
- \bus\b
22+
- \bours?\b
23+
- let's
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Based on: https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc/.vale/gitlab
2+
extends: existence
3+
message: 'Avoid using future tense where possible.'
4+
ignorecase: true
5+
level: warning
6+
link: 'https://github.com/rackerlabs/docs-style-guide/blob/master/style-guide/writing/use-present-tense.rst'
7+
raw:
8+
- "(going to( |\n|[[:punct:]])[a-zA-Z]*|"
9+
- "will( |\n|[[:punct:]])[a-zA-Z]*|"
10+
- "won't( |\n|[[:punct:]])[a-zA-Z]*|"
11+
- "[a-zA-Z]*'ll( |\n|[[:punct:]])[a-zA-Z]*)"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
extends: substitution
2+
message: "Use '%s' instead of '%s'."
3+
link: "https://github.com/rackerlabs/docs-style-guide/blob/master/style-guide/terminology/general-term-guidelines/avoid-obscure-words.rst"
4+
level: warning
5+
ignorecase: true
6+
action:
7+
name: replace
8+
swap:
9+
eg: for example, such as
10+
e\.g: for example, such as
11+
etc\.: and so on
12+
ie: that is
13+
i\.e: that is
14+
as per: according to, by way of
15+
via: through, by, with
16+
'(?:vs\.)[\s]': versus
17+
ergo: therefore
18+
make use of: use
19+
utilize: use
20+
utilization: use
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
extends: existence
2+
message: 'Avoid using past tense where possible: "%s".'
3+
ignorecase: true
4+
level: warning
5+
link: 'https://github.com/rackerlabs/docs-style-guide/blob/master/style-guide/writing/use-present-tense.rst'
6+
scope: sentence
7+
tokens:
8+
- abode
9+
- arisen
10+
- arose
11+
- ate
12+
- awoke
13+
- awoken
14+
- bade
15+
- beaten
16+
- became
17+
- become
18+
- been
19+
- began
20+
- begun
21+
- bent
22+
- bid
23+
- bidden
24+
- bitten
25+
- bled
26+
- blown
27+
- bore
28+
- born
29+
- bought
30+
- broke
31+
- broken
32+
- brought
33+
- built
34+
- came
35+
- caught
36+
- chose
37+
- chosen
38+
- dealt
39+
- did
40+
- done
41+
- drank
42+
- drawn
43+
- drew
44+
- driven
45+
- drove
46+
- drunk
47+
- eaten
48+
- fallen
49+
- fed
50+
- fell
51+
- felt
52+
- flew
53+
- flown
54+
- forgot
55+
- forgotten
56+
- fought
57+
- found
58+
- froze
59+
- frozen
60+
- gave
61+
- given
62+
- gone
63+
- got
64+
- gotten
65+
- grew
66+
- grown
67+
- had
68+
- heard
69+
- held
70+
- hid
71+
- hidden
72+
- hung
73+
- kept
74+
- knew
75+
- known
76+
- laid
77+
- lain
78+
- lay
79+
- led
80+
- left
81+
- lent
82+
- lit
83+
- lost
84+
- made
85+
- meant
86+
- met
87+
- paid
88+
- ran
89+
- rang
90+
- ridden
91+
- risen
92+
- rode
93+
- rose
94+
- rung
95+
- said
96+
- sang
97+
- sank
98+
- sat
99+
- saw
100+
- seen
101+
- sent
102+
- shaken
103+
- shone
104+
- shook
105+
- shot
106+
- showed
107+
- shown
108+
- slept
109+
- slid
110+
- sold
111+
- spent
112+
- spoke
113+
- spoken
114+
- sprang
115+
- sprung
116+
- stole
117+
- stolen
118+
- stood
119+
- stuck
120+
- sung
121+
- sunk
122+
- swam
123+
- swept
124+
- swore
125+
- sworn
126+
- swum
127+
- swung
128+
- taken
129+
- taught
130+
- thought
131+
- threw
132+
- thrown
133+
- told
134+
- took
135+
- tore
136+
- torn
137+
- understood
138+
- was
139+
- went
140+
- were
141+
- woke
142+
- woken
143+
- won
144+
- wore
145+
- worn
146+
- wove
147+
- woven
148+
- written
149+
- wrote
150+
- burnt
151+
- burned
152+
- could
153+
- dived
154+
- dove
155+
- dreamt
156+
- dreamed
157+
- forbade
158+
- forbidden
159+
- leant
160+
- leaned
161+
- learnt
162+
- proved
163+
- proven
164+
- sought
165+
- sped
166+
- spelt
167+
- spun
168+
- stung
169+
- struck
170+
- stricken
171+
- strove
172+
- striven
173+
- swelled
174+
- swollen
175+
- underwent
176+
- undergone
177+
- withdrew
178+
- withdrawn
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
extends: existence
2+
message: "Avoid the subjunctive '%s'."
3+
link: 'https://github.com/rackerlabs/docs-style-guide/blob/master/style-guide/writing/write-to-the-user.rst'
4+
ignorecase: true
5+
level: warning
6+
scope: sentence
7+
nonword: true
8+
tokens:
9+
- '\bwould\b'
10+
- '\ncould\b'
11+
- '\bshould\b'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Based on: https://github.com/errata-ai/proselint/blob/master/proselint/But.yml
2+
3+
extends: existence
4+
message: "Do not start a paragraph with a 'but'."
5+
level: error
6+
scope: paragraph
7+
action:
8+
name: remove
9+
tokens:
10+
- ^But
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "Use a comma to set off a nonrestrictive clause (one that begins with which)."
3+
link: 'https://docs.rackspace.com/docs/style-guide/style/punctuation'
4+
ignorecase: true
5+
level: suggestion
6+
nonword: true
7+
tokens:
8+
- '(\w{1,}) which'

0 commit comments

Comments
 (0)