The project currently uses codespell to detect spelling mistakes. However, codespell does not detect typos in snake_case, which are very common for parameter or variable names.
For example, for the typo pricipal_axis fixed in #2940:
pricipal_axis
pricipal axis
codespell only reports the typo in the second line, but not the first one.
In contrast, typos, another source code spell checker written in Rust, can detect typos in snake_case identifiers.
For a broader comparison of typos with other spell checkers, see:
https://github.com/crate-ci/typos/blob/master/docs/comparison.md
codespell and typos are designed with different philosophies, so a typo may be detected by one tool but not the other (for example, #4688). There are two possible options:
- Replace
codespell with typos.
- Run
typos alongside codespell.
I personally prefer option 2: run both typos and codespell for a few months and then decide whether it makes sense to keep both tools or drop one of them.
The project currently uses codespell to detect spelling mistakes. However,
codespelldoes not detect typos in snake_case, which are very common for parameter or variable names.For example, for the typo
pricipal_axisfixed in #2940:codespellonly reports the typo in the second line, but not the first one.In contrast, typos, another source code spell checker written in Rust, can detect typos in snake_case identifiers.
For a broader comparison of typos with other spell checkers, see:
https://github.com/crate-ci/typos/blob/master/docs/comparison.md
codespellandtyposare designed with different philosophies, so a typo may be detected by one tool but not the other (for example, #4688). There are two possible options:codespellwithtypos.typosalongsidecodespell.I personally prefer option 2: run both
typosandcodespellfor a few months and then decide whether it makes sense to keep both tools or drop one of them.