Skip to content

Use typos for spell checking #4689

Closed

Description

@seisman

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:

  1. Replace codespell with typos.
  2. 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.

Activity

  1. added
    discussions
    on Jun 21, 2026
  2. yvonnefroehlich commented on Jun 21, 2026

    @yvonnefroehlich
    Member

    In contrast, typos, another source code spell checker written in Rust, can detect typos in snake_case identifiers.

    This is very helpful for variable names 🙂.

    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.

    I also prefer option 2.

  3. added this to the 0.19.0 milestone on Jun 24, 2026
  4. added
    maintenance
    and removed
    discussions
    on Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenance

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions