A style package for the prose linting tool Vale that implements the GOV.UK A-Z Style Guide.
-
This is not a spellchecker. Vale comes with a built in US spellcheck dictionary (which this package doesn't check against for obvious reasons) but I haven't managed to find and implement a good en-GB one, and there are good enough options elsewhere.
-
It doesn't check against every entry in the style guide. Some are general topics like “Abbreviations” which are difficult to automate; others are just too discursive. In the "words to avoid" list, some are common words which should only be avoided in certain contexts (for example, when used as verbs rather than nouns).
Vale uses "packages" to manage style rules. Read more about Vale packages
This repository contains a Vale style package, gov-uk.zip
, which includes the following YAML files:
- Avoid.yml
- Hyphens-spacing.yml
- Lower-case.yml
- Upper-case.yml
These rules will check your writing for:
- capitalisation, hyphenation and spacing (together these make up about 70% of the entries in the A-Z style guide)
- the list of words to avoid
- Try out GitHub Actions and GitHub Codespaces
- Some kind of automation to keep the rules up to date when the style guide changes. Possibly based on JSON or screen scraping?
- An interface that doesn't need the command line. This project is mainly aimed at content people who don't always have access to (or confidence with) command line tools or npm packages.
After going round in circles for a long time with various tools I found out about Vale from a talk given by @sabrinaharris about this project, which uses Vale to lint technical documentation against a broader set of style rules.