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 Not Ignoring Words Properly when Provided in Original Case #3385

Closed
SOHAN-cyber opened this issue Mar 14, 2024 · 1 comment
Closed

Comments

@SOHAN-cyber
Copy link

SOHAN-cyber commented Mar 14, 2024

Codespell currently fails to properly ignore words if they are provided in their original case in the ignore file. For instance, when the word "OptIn" is added to the ignore file exactly as it is, Codespell does not recognize it as an ignored word during spell checks. However, when the word is added in lowercase, such as "optin", Codespell successfully ignores it as intended.

Pre-commit Hook Config

  - repo: https://github.com/codespell-project/codespell
    rev: v2.2.6
    hooks:
      - id: codespell
        additional_dependencies:
          - tomli
        args:
          - --ignore-words=extern/make/.config/.codespellignore
          - --config=extern/make/.config/.codespell.toml

.codespellignore

OptIn

Error:

CodeSpell Issue

Solution

To ensure Codespell ignores words correctly, users are currently required to add them in lowercase to the ignore file.

Updated .codespellignore File:

optin

You can find the proposed solution in the following link:

https://cobalt.googlesource.com/cobalt/+/master/.pre-commit-config.yaml#:~:text=%23%20The%20%2D%2Dignore%2Dwords,be%20lowercase%2C%20see

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Mar 14, 2024

Codespell currently fails to properly ignore words if they are provided in their original case in the ignore file.

I think this is not true, see #3272. Besides, I don't understand how a .pre-commit-config.yaml could help.

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

No branches or pull requests

2 participants