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

Minor typo fix in README #3580

Merged
merged 3 commits into from
Nov 15, 2024
Merged

Conversation

DanielYang59
Copy link
Contributor

No description provided.

README.rst Outdated Show resolved Hide resolved
@DanielYang59 DanielYang59 marked this pull request as ready for review November 15, 2024 12:22
This reverts commit 32f27fa.
@larsoner larsoner merged commit a4bbf65 into codespell-project:main Nov 15, 2024
15 checks passed
@larsoner
Copy link
Member

Thanks @DanielYang59

@peternewman
Copy link
Collaborator

Did you test this behaviour @DanielYang59 as I don't believe it's correct. IIRC the readme is effectively trying to say (and codespell's behaviour is):

When ignoring false positives, note that spelling errors are case-insensitive but words to ignore are case-sensitive based on how they appear in the dictionary. For example, the dictionary entry wrod will also match the typo Wrod, but to ignore either version you must pass wrod (because that is how it is listed in the dictionary).

@larsoner
Copy link
Member

Oops I did not actually check... PR welcome to fix

@DanielYang59 DanielYang59 deleted the fix-typo branch November 16, 2024 05:18
@DanielYang59
Copy link
Contributor Author

DanielYang59 commented Nov 16, 2024

@peternewman @larsoner Apologize I didn't really check the behavior, I misunderstood the docs and thought it's simply a typo.

I could confirm @peternewman is correct:

wrod = 0  # codespell:ignore wrod
wrod = 0  # codespell:ignore Wrod  # Marked as spell error

Wrod = 1  # codespell:ignore wrod
Wrod = 1  # codespell:ignore Wrod  # Marked as spell error

to ignore either version you must pass wrod (because that is how it is listed in the dictionary).

I now understand what the docs are trying to convey (the "ignore pattern from config" is case sensitive and should match its corresponding entry from the dictionary). I thought to ignore Wrod you have to give Wrod


However I still found the documentation confusing to me:

When ignoring false positives, note that spelling errors are case-insensitive but words to ignore are case-sensitive.

  1. The meaning of "spelling error" (the error found from the file to be checked? ) was a bit vague to me when I read the docs. Because the "ignore pattern we give from config" is also a "spelling error", can we clarify to something like "spelling error in the target file"?

because that is how it is listed in the dictionary

  1. I believe this should be mentioned in the README, as I'm a new user, and I don't know this behaviour at all after reading the Ignoring words section.

  2. Also I found it a bit confusing to have "seemingly" different behaviours for different words, however I just had a quick look at the dictionary, it appears to me most (if not all) entries are lowercase (including names)? If that's the case, can we change the README to "the word to ignore should be lowercase" instead of "the word to ignore should be case-sensitive",

    Update: never mind, I do see word that is not lowercase. But wow, it's so confusing, why names are lowercase?

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

Successfully merging this pull request may close these issues.

3 participants