Skip to content

X0032 typos-misspelling

Rule: No misspelled word in code, comments, docs or file names.

Code X0032 (stable, never reused)
Id typos-misspelling
Category typos
Source typos (run as an executable)
Fix exact: spl check --fix applies it
Needs typos installed

Level per tier

Tier Level Reason
small warn a misspelled identifier is copied to every call site; typos has almost no false positives
small-workspace warn a misspelled identifier is copied to every call site; typos has almost no false positives
medium warn a misspelled identifier is copied to every call site; typos has almost no false positives
big deny names are searched across hundreds of crates; a misspelling hides from every search
ai off
embedded off
ui off
egui off
units-strict off
units-paranoid off

Why

A misspelled identifier is copied into every call site, and a misspelled word in a doc comment is searched for and not found. typos checks code, comments, docs and file names against a list of known misspellings, so it has very few false positives.

How to fix

spl check --fix writes the correction where typos knows exactly one. A word that is right in this project (a name, an abbreviation) goes into a checked-in typos.toml:

[default.extend-words]
ser = "ser"

Configure

[lints.typos-misspelling]
level = "deny"
reason = "why this project wants it at this level"

Allow one finding in the code with // spirit-level: allow(typos-misspelling) <reason> (waivers); the code works there too, as in [lints.X0032].