typos
Fast source code spellchecker written in Rust (https://github.com/crate-ci/typos)
To check for typos in the current directory
To check a specific directory
To list typos without fixing
To check and output in JSON format
To use a custom config file
typos --config _typos.toml
To add a word to the custom dictionary (dictionary.txt, one word per line)
echo "myword" >> dictionary.txt
To sort the dictionary after additions
sort dictionary.txt -u -o dictionary.txt
To regenerate _typos.toml from dictionary.txt (project convention)
python3 scripts/generate_typos_config.py && typos
To run a focused check on a single file (project convention)
task spellcheck-file FILE=path/to/file
Canonical _typos.toml structure (auto-generated — do NOT hand-edit):
[default.extend-words]
"myword" = "myword"
GitHub Actions CI integration:
- uses: crate-ci/typos@v1