-
Notifications
You must be signed in to change notification settings - Fork 42
Add Vale to RTD pre-commit #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
17e819a
1303881
073e8ac
b570f2d
02052ea
c32afb3
cb612eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
StylesPath = docs/vale/ | ||
MinAlertLevel = suggestion | ||
|
||
[*.rst] | ||
|
||
BasedOnStyles = Vale, RTD, proselint, TheEconomist | ||
Vale.Repetition = YES | ||
|
||
# TODO: Enable spelling, but it's currently too noisy | ||
Vale.Spelling = NO | ||
|
||
# Initially, some proselint styles were included in vale. | ||
# In later vale versions, those were removed, so now we include | ||
# the full proselint set. | ||
# However, we have a fair bit of legacy that violates the styles | ||
# below, so those are disabled to allow us to move forward for now. | ||
proselint.Very = NO | ||
proselint.But = NO | ||
proselint.Typography = NO | ||
TheEconomist.UnnecessaryWords = NO | ||
|
||
|
||
; Ignores are a bit janky, do this for now.. | ||
|
||
[CHANGELOG.rst] | ||
BasedOnStyles = | ||
|
||
[docs/dev/*.rst] | ||
BasedOnStyles = |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||
extends: substitution | ||||||
message: Use 'Single sign-on' instead of '%s' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also note the message double substitution is important. Very silly this isn't just a default for the
Suggested change
|
||||||
level: warning | ||||||
swap: | ||||||
Single Sign-On: Single sign-on | ||||||
Single Sign on: Single sign-on | ||||||
single sign-on: Single sign-on | ||||||
single Sign-On: Single sign-on | ||||||
single Sign on: Single sign-on | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this is substituting a capitalized version still. I fixed this using case insensitivity and exceptions: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends: substitution | ||
message: Use '%s' instead of '%s' | ||
level: error | ||
swap: | ||
Read The Docs: Read the Docs | ||
RTD: Read the Docs | ||
ReadTheDocs: Read the Docs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
extends: existence | ||
message: "'%s' - Do not be hectoring or arrogant" | ||
description: "Those who disagree with you are not necessarily '%s.'" | ||
link: http://www.economist.com/styleguide/introduction | ||
scope: text | ||
level: warning | ||
ignorecase: true | ||
tokens: | ||
- stupid | ||
- idiotic | ||
- imbecile | ||
- ignorant | ||
- insane | ||
- absurd | ||
- ridiculous | ||
- lunatic | ||
- asinine |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
extends: existence | ||
message: "'%s' - See section 'Unnecessary words'" | ||
level: warning | ||
scope: text | ||
description: Some words add nothing but length to your prose. | ||
link: http://www.economist.com/style-guide/unnecessary-words | ||
ignorecase: true | ||
tokens: | ||
- any time soon | ||
- bought up | ||
- cut back | ||
- cutbacks | ||
- for free | ||
- free gift | ||
- freed up | ||
- hatched up | ||
- headed up by | ||
- large-scale | ||
- meet with | ||
- Most especially | ||
- Most probably | ||
- policymaking process | ||
- safe haven | ||
- sale events | ||
- sent off to bed | ||
- so-called | ||
- sold off | ||
- strike action | ||
- The fact that | ||
- This time around | ||
- top priority | ||
- track record | ||
- weather conditions | ||
- wilderness area |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Based on [The Economist](http://www.economist.com/styleguide/introduction). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends: existence | ||
message: "'%s' is airlinese." | ||
ignorecase: true | ||
level: error | ||
tokens: | ||
- enplan(?:e|ed|ing|ement) | ||
- deplan(?:e|ed|ing|ement) | ||
- taking off momentarily |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
extends: substitution | ||
message: "Consider using '%s' instead of '%s'." | ||
level: error | ||
action: | ||
name: replace | ||
swap: | ||
(?:bull|ox)-like: taurine | ||
(?:calf|veal)-like: vituline | ||
(?:crow|raven)-like: corvine | ||
(?:leopard|panther)-like: pardine | ||
bird-like: avine | ||
centipede-like: scolopendrine | ||
crab-like: cancrine | ||
crocodile-like: crocodiline | ||
deer-like: damine | ||
eagle-like: aquiline | ||
earthworm-like: lumbricine | ||
falcon-like: falconine | ||
ferine: wild animal-like | ||
fish-like: piscine | ||
fox-like: vulpine | ||
frog-like: ranine | ||
goat-like: hircine | ||
goose-like: anserine | ||
gull-like: laridine | ||
hare-like: leporine | ||
hawk-like: accipitrine | ||
hippopotamus-like: hippopotamine | ||
lizard-like: lacertine | ||
mongoose-like: viverrine | ||
mouse-like: murine | ||
ostrich-like: struthionine | ||
peacock-like: pavonine | ||
porcupine-like: hystricine | ||
rattlesnake-like: crotaline | ||
sable-like: zibeline | ||
sheep-like: ovine | ||
shrew-like: soricine | ||
sparrow-like: passerine | ||
swallow-like: hirundine | ||
swine-like: suilline | ||
tiger-like: tigrine | ||
viper-like: viperine | ||
vulture-like: vulturine | ||
wasp-like: vespine | ||
wolf-like: lupine | ||
woodpecker-like: picine | ||
zebra-like: zebrine |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends: existence | ||
message: "'%s' left in text." | ||
ignorecase: false | ||
level: error | ||
tokens: | ||
- XXX | ||
- FIXME | ||
- TODO | ||
- NOTE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends: existence | ||
message: "Excessive apologizing: '%s'" | ||
ignorecase: true | ||
level: error | ||
action: | ||
name: remove | ||
tokens: | ||
- More research is needed |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
extends: existence | ||
message: "'%s' is archaic." | ||
ignorecase: true | ||
level: error | ||
tokens: | ||
- alack | ||
- anent | ||
- begat | ||
- belike | ||
- betimes | ||
- boughten | ||
- brocage | ||
- brokage | ||
- camarade | ||
- chiefer | ||
- chiefest | ||
- Christiana | ||
- completely obsolescent | ||
- cozen | ||
- divers | ||
- deflexion | ||
- fain | ||
- forsooth | ||
- foreclose from | ||
- haply | ||
- howbeit | ||
- illumine | ||
- in sooth | ||
- maugre | ||
- meseems | ||
- methinks | ||
- nigh | ||
- peradventure | ||
- perchance | ||
- saith | ||
- shew | ||
- sistren | ||
- spake | ||
- to wit | ||
- verily | ||
- whilom | ||
- withal | ||
- wot | ||
- enclosed please find | ||
- please find enclosed | ||
- enclosed herewith | ||
- enclosed herein | ||
- inforce | ||
- ex postfacto | ||
- foreclose from | ||
- forewent | ||
- for ever |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends: existence | ||
message: "Do not start a paragraph with a 'but'." | ||
level: error | ||
scope: paragraph | ||
action: | ||
name: remove | ||
tokens: | ||
- ^But |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this file in a PR, so we should reflect that here. But note that the filename is incorrect, it needs to be
.yml
for vale to find it.