Skip to content

Codespell doesn't identify issues in docstrings and markdown #2411

Description

@Goldziher

Hi there,

So I am running codespell using pre-commit and it doesn't identify errors inside docstrings and markdown files. See for example this commit in Starlite --> litestar-org/litestar@26afa44, I fixed typos in it using intellij code inspection, all of which were not identified by codespell at all.

Activity

  1. peternewman commented on Jul 22, 2022

    @peternewman
    Collaborator

    Respose and arbitary are present in the main codespell dictionary (I didn't double-check the others). But I think the backticks around it are possibly excluding it at being a standalone word, probably likewise the underscore after the arbitrary typo, it depends on the regex.

    Feel free to submit further typos to the dictionary as a PR, but I suspect you shouldn't just steal what intellij found...

  2. Goldziher commented on Jul 22, 2022

    @Goldziher
    Author

    Respose and arbitary are present in the main codespell dictionary (I didn't double-check the others). But I think the backticks around it are possibly excluding it at being a standalone word, probably likewise the underscore after the arbitrary typo, it depends on the regex.

    Feel free to submit further typos to the dictionary as a PR, but I suspect you shouldn't just steal what intellij found...

    Issue is not about dictionary words, it's about typos not being identified in various places. This indicates a parsing bug imo.

  3. peternewman commented on Aug 16, 2022

    @peternewman
    Collaborator

    The regex can be customised on the command line, PRs welcome for one that improves on this. I think there was one to handle snake case for your arbitrary example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions