Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Goldziher opened this issue Jul 21, 2022 · 3 comments · Fixed by #3280
Closed

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

Goldziher opened this issue Jul 21, 2022 · 3 comments · Fixed by #3280

Comments

@Goldziher
Copy link

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.

@peternewman
Copy link
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...

@Goldziher
Copy link
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.

@peternewman
Copy link
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.

matlupi added a commit to matlupi/codespell that referenced this issue Jan 10, 2024
matlupi added a commit to matlupi/codespell that referenced this issue Jan 10, 2024
matlupi added a commit to matlupi/codespell that referenced this issue Jan 11, 2024
DimitriPapadopoulos pushed a commit that referenced this issue Jan 12, 2024
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants