Typos tokenizes on punctuation, so it can never enforce a hyphenated phrase.
The shared dictionary carries those phrases under [phrases.corrections], and
check-phrases applies them to a repository's tracked text:
uvx --from "git+https://github.com/leynos/typos-config-builder.git@FULL_COMMIT_SHA" \
typos-config-builder check-phrases --repository .
The command reads .typos-oxendict-base.toml, merges typos.local.toml when
it is present, and scans every tracked file except the policy documents
themselves. A finding is printed as a location, the phrase as written, and the
prescribed replacement:
docs/users-guide.md:42:15: some-phrase -> somephrase
A phrase matches case-insensitively and only when neither neighbouring character is a word character nor a hyphen, so a longer compound is never reported. Text matched by a shared or local ignore expression is blanked before scanning, with every line and column preserved, so a finding's location is the location in the original file. Overlapping ignored spans are marked against the original text and blanked together, so masking one span never exposes another.
File exclusions are applied with gitignore semantics over the policy's
normalized order. Generation sorts every policy list, so a re-inclusion such as
!README.md is ordered before the *.md it was written to qualify and has no
effect. Express exclusions without relying on re-inclusion.
A tracked file whose bytes are not valid UTF-8 is treated as binary and skipped, so a tracked image, font, archive, or compiled artefact does not fail the gate. The check still fails closed on a tracked file that cannot be read at all, because that means the worktree changed under the scan and a skipped file is exactly the one most likely to have drifted. Tracked symlinks are skipped so the scan cannot follow a link out of the repository.
Exit codes are:
| Exit code | Meaning |
|---|---|
| 0 | No prohibited phrase was found. |
| 1 | Policy could not be loaded, or tracked text could not be scanned. |
| 2 | At least one prohibited phrase was found. |
Exit code 1 prints a single error: ... line on standard error, never a
traceback. A missing .typos-oxendict-base.toml names the builder invocation
that creates it.