-
Notifications
You must be signed in to change notification settings - Fork 9
Add Vale for content linting to the repo #541
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 9 commits
887e0e0
2a2348c
b091a30
a0e8d26
ca5a045
e32d217
5293621
77fd9a0
915a6e8
d83fe9b
703f01e
e1d5b39
31dd235
6fead66
815e295
2076cd7
fa2ec11
36ddf8c
8539fe0
db62870
1f0983c
3d1617e
a2af066
f5201d8
7b25e03
808b1e7
bf1841f
f8aad48
a20c799
73fd5c1
3adfd7b
f53e939
3748887
245674e
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,4 @@ | ||
| # only track the custom Vale rules | ||
| /* | ||
| !.gitignore | ||
| !custom/ |
|
paddyroddy marked this conversation as resolved.
Outdated
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| --- | ||
| extends: substitution | ||
| message: Use the British spelling '%s' instead of the US '%s'. | ||
| level: error | ||
| ignorecase: true | ||
| swap: | ||
| # -our vs. -or | ||
| ardor: ardour | ||
| candor: candour | ||
| color: colour | ||
| demeanor: demeanour | ||
| endeavor: endeavour | ||
| favour: favour | ||
| fervor: fervour | ||
| flavor: flavour | ||
| harbor: harbour | ||
| honor: honour | ||
| humor: humour | ||
| labor: labour | ||
| neighbor: neighbour | ||
| odor: odour | ||
| pavor: pavour | ||
| rancor: rancour | ||
| rigor: rigour | ||
| rumor: rumour | ||
| savor: savour | ||
| splendor: splendour | ||
| succor: succour | ||
| valour: valour | ||
| vapor: vapour | ||
| vigor: vigour | ||
| # and their derivatives | ||
| colored: coloured | ||
| coloring: colouring | ||
| colors: colours | ||
| endeavored: endeavoured | ||
| endeavoring: endeavouring | ||
| flavored: flavoured | ||
| flavoring: flavouring | ||
| honored: honoured | ||
| honoring: honouring | ||
| honors: honours | ||
| humors: humours | ||
| labored: laboured | ||
| laboring: labouring | ||
| labors: labours | ||
| neighbors: neighbours | ||
| rumors: rumours | ||
| splendors: splendours | ||
| # -re vs. -er | ||
| caliber: calibre | ||
| center: centre | ||
| fiber: fibre | ||
| luster: lustre | ||
| meager: meagre | ||
| meter: metre | ||
| saber: sabre | ||
| saltpeter: saltpetre | ||
| sepulcher: sepulchre | ||
| theater: theatre | ||
| # and their derivatives | ||
| calibers: calibres | ||
| centers: centres | ||
| fibers: fibres | ||
| lusters: lustres | ||
| meters: metres | ||
| theaters: theatres | ||
| # -ise vs. -ize | ||
| '(\w+)ization\b': "$1isation" | ||
| '(\w+)ize\b': "$1ise" | ||
| '(\w+)ized\b': "$1ised" | ||
| '(\w+)izing\b': "$1ising" | ||
|
paddyroddy marked this conversation as resolved.
Outdated
|
||
| # add other common forms: | ||
| '(\w+)izable\b': "$1isable" | ||
|
paddyroddy marked this conversation as resolved.
Outdated
|
||
| # -yse vs. -yze | ||
| '(\w+)yze\b': "$1yse" | ||
| '(\w+)yzed\b': "$1ysed" | ||
| '(\w+)yzing\b': "$1ysing" | ||
| # double L vs. Single L | ||
| distill: distil | ||
| enroll: enrol | ||
| enrollment: enrolment | ||
| enthrall: enthral | ||
| fulfill: fulfil | ||
| initialed: initialled | ||
| initialing: initialling | ||
| instill: instil | ||
| labeled: labelled | ||
| labeling: labelling | ||
| libelous: libellous | ||
| modeling: modelling | ||
| signaling: signalling | ||
| traveler: traveller | ||
| traveling: travelling | ||
| traveled: travelled | ||
| # -ogue vs. -og | ||
| analog: analogue | ||
| catalog: catalogue | ||
| demagog: demagogue | ||
| dialog: dialogue | ||
| monolog: monologue | ||
| pedagog: pedagogue | ||
| prolog: prologue | ||
| # ae/oe vs. e | ||
| airplane: aeroplane | ||
| anemia: anaemia | ||
| anesthesia: anaesthesia | ||
| encyclopedia: encyclopaedia | ||
| eon: aeon | ||
| fetus: foetus | ||
| pediatric: paediatric | ||
| # -ce vs. -se | ||
| defense: defence | ||
| license: licence | ||
| offense: offence | ||
| pretense: pretence | ||
| # miscellaneous specific words | ||
| aging: ageing | ||
| aluminum: aluminium | ||
| authorizer: authoriser | ||
| buses: busses | ||
| cipher: cypher | ||
| cozy: cosy | ||
| dependent: dependant | ||
| draft: draught | ||
| furor: furore | ||
| gray: grey | ||
| inquiry: enquiry | ||
| jail: gaol | ||
| jewelry: jewellery | ||
| likable: likeable | ||
| livable: liveable | ||
| maneuver: manoeuvre | ||
| marvelous: marvellous | ||
| matte: matt | ||
| mustache: moustache | ||
| pajamas: pyjamas | ||
| plow: plough | ||
| programme: program | ||
| ratable: rateable | ||
| reconnoiter: reconnoitre | ||
| sizable: sizeable | ||
| skillful: skilful | ||
| smolder: smoulder | ||
| somber: sombre | ||
| specialty: speciality | ||
| specter: spectre | ||
| sulfur: sulphur | ||
| unshakable: unshakeable | ||
| willful: wilful | ||
| yogurt: yoghurt | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| extends: existence | ||
| message: Don't put a space before or after a dash. | ||
| nonword: true | ||
| level: warning | ||
| action: | ||
| name: edit | ||
| params: | ||
| - remove | ||
| - " " | ||
| tokens: | ||
| - '\s[—–]\s' |
|
paddyroddy marked this conversation as resolved.
Outdated
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| extends: existence | ||
| message: >- | ||
| Avoid en dashes ('–'). For hyphenated words, use a hyphen ('-').\nFor | ||
| parenthesis, use an em dash ('—'). | ||
| nonword: true | ||
| level: error | ||
| action: | ||
| name: edit | ||
| params: | ||
| - replace | ||
| - "-" | ||
| - "—" | ||
| tokens: | ||
| - "–" |
|
paddyroddy marked this conversation as resolved.
Outdated
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| extends: substitution | ||
| message: Use '%s' instead of '%s.' | ||
| level: error | ||
| ignorecase: true | ||
| swap: | ||
| aren't: are not, | ||
| can't: cannot, | ||
| couldn't: could not, | ||
| didn't: did not, | ||
| doesn't: does not, | ||
| don't: do not, | ||
| hasn't: has not, | ||
| haven't: have not, | ||
| how'll: how will, | ||
| how's: how is, | ||
| isn't: is not, | ||
| it'll: it will, | ||
| it's: it is, | ||
| shouldn't: should not | ||
| that'll: that will, | ||
| that's: that is, | ||
| they'll: they will, | ||
| they're: they are, | ||
| wasn't: was not, | ||
| we'll: we will, | ||
| we're: we are, | ||
| we've: we have, | ||
| weren't: were not, | ||
| what'll: what will, | ||
| what's: what is, | ||
| when'll: when will, | ||
| when's: when is, | ||
| where'll: where will, | ||
| where's: where is, | ||
| who'll: who will, | ||
| who's: who is, | ||
| why'll: why will, | ||
| why's: why is, | ||
| won't: will not, | ||
| you're: you are |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| extends: existence | ||
| message: Use the Oxford comma in '%s'. | ||
| scope: sentence | ||
| level: suggestion | ||
| tokens: | ||
| - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| extends: existence | ||
| message: Use straight quotes instead of smart quotes. | ||
| level: error | ||
| nonword: true | ||
| action: | ||
| tokens: | ||
| - “ | ||
| - ” | ||
| - ‘ | ||
| - ’ |
|
paddyroddy marked this conversation as resolved.
Outdated
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| extends: existence | ||
| message: Use only one space between words and sentences (not two). | ||
| level: error | ||
| nonword: true | ||
| tokens: | ||
| - '[\w.?!,\(\)\-":] {2,}[\w.?!,\(\)\-":]' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| StylesPath = .github/styles | ||
|
|
||
| # https://github.com/errata-ai/packages | ||
| Packages = proselint | ||
|
|
||
| [*.md] | ||
| BasedOnStyles = proselint,\ | ||
| Vale | ||
|
|
||
| # Disable | ||
| Vale.Spelling = NO |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # MIT License | ||
|
|
||
| Copyright (c) 2023-2025 UCL Centre for Advanced Research Computing | ||
| Copyright © 2023-2025 UCL Centre for Advanced Research Computing | ||
|
Member
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. Oh. It's from
Member
Author
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. What is the practice involving licences? Once made can never change? Why do we use the
Member
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. Well the GPL specifically says "thou shalt not change this file". MIT doesn't have any such clause. But to avoid potential problems, I would not reword license files.
Member
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. Oh wait I realise you mean why the
Member
Author
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. I don't know where it came from, it is a bit weird though.
Member
Author
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. I don't know enough about licences, but it does seem weird that I can't reword my own licence. Guess it makes sense for GPL. Like what if you made a typo? |
||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| this software and associated documentation files (the "Software"), to deal in | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ body: | |
| value: |- | ||
| import cookiecutter_test | ||
|
|
||
| ... | ||
| … | ||
|
Collaborator
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. I'd say we want to disable the ellipsis replacement because of places like this - this is Python code in a YAML file and I suspect we'll have other cases like this where we have for example Python code in a Markdown file that we don't want it touch. While it doesn't really matter here as this is meant more to indicate user to fill in rest of reproducing code, while
Member
Author
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. That is a fair enough reason. @K-Meech raised the point of screen readers for prose though.
Member
Author
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. This file shouldn't have changed as not a Markdown file. This is me copy-and-pasting
Contributor
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. @paddyroddy - I'm not sure what you mean by 'screen readers for prose' here? As far as I'm aware screen readers will handle both ellipsis styles similarly
Member
Author
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. Sorry, I thought that was something said the other day. I have no idea what they do with ellipsis. |
||
| render: Python | ||
| validations: | ||
| required: true | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.