[codespell]
# codespell earns its place next to typos for exactly one dictionary. Measured on this
# tree at the time this file landed: `clear,rare,usage` finds nothing typos does not
# already gate, and adding `en-GB_to_en-US` finds eight. typos does not do dialect
# conversion at all -- it corrects misspellings, and a British spelling is not one -- so
# nothing else here would ever catch them. The wider two are kept anyway because they
# cost nothing measurable on this tree and this repository is mostly prose, which is
# where `rare` and `usage` earn out.
#
# The net is not complete, and the gap is worth knowing rather than rediscovering. The
# dictionary carries a base form and its plural but not every inflection, and it does
# not split identifiers -- so a past participle, a prefixed form, or a British spelling
# inside a name such as `test_a_dispatch_is_honoured` passes clean. This gates the easy
# majority; it does not retire the need for a person.
builtin = clear,rare,usage,en-GB_to_en-US
# Load-bearing, not decorative. codespell skips dotfiles and dotted directories by
# default, which here means all of .github/ plus .git-blame-ignore-revs -- six of the
# eight findings in the sweep that preceded this file. Without this line the hook lands
# green over the bulk of what it is meant to read.
check-hidden = true
# `Nd` is the Unicode general category of decimal digits, which is what Python's `\d`
# selects and what the Rust port has to reproduce; _typos.toml carries the same
# exemption for the same reason. This list is case-sensitive -- verified, not assumed:
# `Nd` is spared while the lowercase form still blocks, which is what keeps the
# exemption to the category name without also excusing a typo for "and".
ignore-words-list = Nd
# Globs, not directory prefixes: codespell matches each entry against the basename and
# against the path as a glob, so a bare `corpus/cli` silently matches nothing. The
# leading `*` is load-bearing too, and is why these are not written `corpus/cli/*`:
# pre-commit passes `corpus/cli/...` while a shell `codespell .` walks to
# `./corpus/cli/...`, and only a pattern indifferent to the prefix covers both. The
# corpus entries are belt-and-braces -- the `exclude:` in .pre-commit-config.yaml
# already keeps every tier of it away from the hook -- and what they buy is a bare
# `codespell` run free of decode warnings from the deliberately non-UTF8 fixture under
# corpus/cli/. `corpus/README.md` is prose about the corpus and stays in scope,
# matching the other four engines.
#
# .gitignore is generated by concatenating community templates, and its .NET
# boilerplate trips this twelve times: package-manager names, and the word fragments a
# split bracket expression leaves behind. They are described rather than quoted, and
# that is the finding worth keeping -- a spell-check config that names a false positive
# contains one, and there is no single directive that buys silence from both gates on
# this tree. codespell wants a bare `codespell:ignore` as the last thing on the line
# (the word-list form `codespell:ignore a,b` is unrecognized, and reads its own words
# as prose, so the line flags twice rather than none), while typos wants
# `spellchecker:disable-line` in that same final position. Describing beats quoting.
# Not ours to correct either way, which is the same call _typos.toml makes.
#
# CHANGELOG.md is preemptive: none ships yet, but cliff.toml means one will, and it is
# generated from commit messages already gated by gitlint.
#
# Unlike the typos hook above it in .pre-commit-config.yaml, this needs no duplicate
# `exclude:` there. That hook repeats its exclusion because typos treats `[files]
# extend-exclude` as file-discovery config and pre-commit hands it an explicit list
# instead. codespell's `skip` does apply to explicitly-passed filenames -- verified --
# so this file is the only place the rule is written.
skip = uv.lock,.git,.venv,.gitignore,CHANGELOG.md,*corpus/cases/*,*corpus/cli/*
