Depends on #30782.
Adds `Coder.USSpelling` at `warning` severity.
The rule flags an `-ise` family (`organise`, `initialise`,
`authorisation`) and a list of British spellings (`behaviour`,
`labelled`, `cancelled`, `analogue`, `whilst`, and others) and suggests
the US form.
It covers `docs/**` except `docs/.style/style-guide/**` and the
generated `docs/reference/{api,cli}/*.md` pages.
Baseline: 13 findings before cleanup, 0 after.
The first commit fixes 11 of them: 10 in hand-written pages and 1 in the
Prometheus metrics table, which comes from metric help text.
Two findings sit in generated reference pages, which `.vale.ini`
excludes for this rule: the CLI alias `favourite` and `amongst` in a Go
comment from a vendored dependency (the DERP map schema).
The metric help text comes from `querymetrics.go`, so the fix lands
there and in `generated_metrics` and `prometheus.md`.
Known false positive: Vale doesn't skip bold text, so a UI label in bold
that keeps British spelling is flagged.
The rule comment and the guide footer say to use a code span for such a
label.
Linear: DOCS-1280
<details>
<summary>Decision log</summary>
- **Rule type**: `substitution`, so each message names the US form.
The `-ise` family can't name a specific replacement, so it suggests "the
-ize form".
- **`cancelled`**: the guide's "Use US spelling" section lists
`canceled` and `canceling`.
The rule flags the double-l verb forms and leaves `cancellation` alone,
which Merriam-Webster spells with one `l`.
- **Exceptions**: Vale applies an exception to the matched word, so each
is anchored with `^` and `$` and case-insensitive.
The list covers `-wise` words and stems for `advise`, `advertise`,
`exercise`, `promise`, `premise`, `compromise`, `surprise`, `comprise`,
`concise`, `precise`, `revise`, `supervise`, `televise`, `devise`,
`improvise`, `franchise`, `merchandise`, `disguise`, `despise`,
`paradise`, `cruise`, `noise`, `raise`, `rise`, `wise`, and others, each
with the endings `e`, `es`, `ed`, `ing`, `er`, and `ers`.
The `mise` tool is excepted by name.
- **Extra British spellings** beyond the guide table: other doubled-`l`
verbs (`signalled`, `levelled`), `metre`, `litre`, `fibre`, `theatre`,
`calibre`, `offence`, `pretence`, `analyse`, `judgement`,
`acknowledgement`, `ageing`, `artefact`, `sceptic`, `aluminium`,
`practise`, `enrol`, `fulfil`, `instil`, `skilful`.
None appears in the corpus today.
- **Generated pages**: excluded for `docs/reference/{api,cli}/*.md`, as
`Coder.UnitSpacing` does.
Changing the `favourite` alias would change CLI behavior, and the
`amongst` comment isn't ours to edit.
- **Prometheus doc**: edited by hand with matching table padding because
`go run ./scripts/metricsdocgen` already rewrites the whole table on the
base branch, independent of this change.
Test cases, run with `vale --config` against fixtures that are not
committed, in LF and CRLF:
- Positive: `organise`, `initialise`, `authorise`, `customisation`,
`authorisation`, `organisations`, `Organised`, `initialising`,
`recogniser`, `customisable`, every explicit list entry, and capitalized
forms.
- Negative: `advise`, `exercise`, `otherwise`, `Enterprise`, `premise`,
`compromise`, `promise`, `surprise`, `precise`, `concise`, `expertise`,
`revising`, `supervising`, `improvising`, `raise`, `noise`, `cruise`,
`franchise`, `merchandise`, `disguise`, `despise`, `paradise`,
`appraise`, `sunrise`, `arise`, `liaise`, `clockwise`, `cancellation`,
`canceled`, `mise`.
- Skipped: words in code spans and fenced code blocks, such as
`cancelled`.
- LF and CRLF results are identical.
Checks: `vale --output=line docs/` reports 0 `Coder.USSpelling`
findings, `make lint/style-claims` passes, and the pre-commit hooks pass
on both commits.
</details>
*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*