Use American English throughout - #25
Merged
Merged
Conversation
Mixed spellings across 28 files, mostly mine: `honoured`, `behaviour`, `recognise`, `serialise`, `neighbour`, `licence`, `centred`, `whilst`, `sanitised`, `defence` and friends. 91 lines, comments and doc prose plus a handful of strings the user actually sees: - `auth status` said "unrecognised prefix" - a bad token said "Mapbox does not recognise the token it would be given." - three warnings said "`--output` is not honoured by ..." The `cancelled` error code is deliberately left alone. It is the machine-readable `code` in the JSON error contract, documented in docs/commands.md and asserted in tests/non_interactive.rs, so renaming it is a breaking change rather than a spelling fix. Worth doing before 1.0, but as its own decision with its own changelog entry. No behaviour change otherwise, and nothing generated was touched: openapi/ and internal/ are excluded, docs/commands.md's sample output is untouched, and every edited line sits outside a code fence.
CONTRIBUTING.md now says to write American English, and `prose_is_american_english` in tests/source_guards.rs holds it. The argument is the one that file's neighbours already make: the section this lands in lists four rules the compiler holds "rather than a reviewer", and a spelling nobody is checking is exactly the kind of thing that drifts across 27 files before anyone notices. It earned its place immediately. The sweep in the previous commit used a word-boundary regex, and this guard found sixteen lines it had missed, all of them real: - `eprint_labelled` and `labelled_lines` in output.rs, plus five test names around them — identifiers, where `\b` does not match inside `labelled_lines` - `mislabelled` and `Serialising`, where the British word is a prefix or suffix of a longer one - `"unserialisable error"`, which is a message the CLI prints - `Honouring` at the start of a sentence Two things are skipped deliberately. Fenced code blocks, because sample output and captured API responses are quoted rather than written and rewriting a word inside one would make the document misquote its source — docs/commands.md is full of both, and a British place name in a geocoding result is not a misspelling. And `cancelled`, which is a compatibility promise rather than a spelling, with the reason on the constant. The table of spellings to avoid is itself a list of spellings to avoid, so the check skips a line that is nothing but two quoted strings and a comma. Narrow enough to excuse a data row and not a sentence. Verified both ways rather than trusting a green run: a British spelling in prose fails, naming `src/output.rs:88`, and the same word inside a fenced block passes. No changelog entry. Error *message* text is not one of the promises CONTRIBUTING.md lists — command names, flags, the output modes and the exit codes are. 597 tests, fmt and clippy clean.
zmofei
approved these changes
Sep 16, 2026
Member
|
@mattpodwysocki I’ll merge this one and rebase the other PRs onto main, since I noticed some duplicate changes across the PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spellings were mixed across 28 files — mostly my own writing.
honoured,behaviour,recognise,serialise,neighbour,licence,centred,whilst,sanitised,defenceand friends.Nearly all of it is comments and doc prose, but some is text a user actually sees, so this isn't purely cosmetic:
auth statusunrecognised prefixMapbox does not recognise the token it would be given.completion,tilesets-cli(×2)Warning: `--output` is not honoured by …{"code":"error","message":"unserialisable error"}Second commit: the convention is now a test
There's no AGENTS.md in this repo, so the instruction went into CONTRIBUTING.md — and specifically into the section that already lists four rules "the compiler holds rather than a reviewer". A spelling nobody checks is exactly what drifts across 27 files before anyone notices, so
prose_is_american_englishintests/source_guards.rsholds it instead.It earned its place immediately. My sweep used a word-boundary regex; the guard found 16 lines it had missed, every one real:
eprint_labelled,labelled_linesand five test names around them — identifiers, where\bnever matches insidelabelled_linesmislabelled,Serialising— the British word as a prefix or suffix of a longer one"unserialisable error", which the CLI printsHonouringat the start of a sentenceThat's the argument for the test over the instruction, made by the test on its first run.
Two deliberate exemptions. Fenced code blocks, because sample output and captured API responses are quoted rather than written —
docs/commands.mdis full of both, and a British place name in a geocoding result is not a misspelling; rewriting it would make the doc misquote the API. Andcancelled, for the reason below.Also: the table of spellings to avoid is itself a list of spellings to avoid, so the check skips a line that is nothing but two quoted strings and a comma — narrow enough to excuse a data row and not a sentence.
Verified both ways, not just by a green run:
cancelledis deliberately left aloneThat string is the machine-readable
codein the JSON error contract, documented indocs/commands.md's status table and asserted intests/non_interactive.rs, so anyone scripting against us may be matching on it. Renaming it is a breaking change, not a spelling fix. My recommendation is to do it, before 1.0 while it's cheap, but as its own PR with its own changelog entry — happy to open that.Scope
openapi/andcustom-openapi/excluded, and the guard excludes them too: their descriptions reach users as help text, but the words are the API teams', mirrored from upstream, and an edit wouldn't survive a regenerate. Both are clean today.## Unreleasedlines as Document installing without the install script #26.)597 tests,
cargo fmt --checkandcargo clippy --locked --all-targetsclean.