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

case-sensitive Ignore #2323

Open
dkg opened this issue Mar 30, 2022 · 1 comment
Open

case-sensitive Ignore #2323

dkg opened this issue Mar 30, 2022 · 1 comment

Comments

@dkg
Copy link
Contributor

dkg commented Mar 30, 2022

I'm looking at a document `foo.txt that mentions someone named "William Manger".

codespell defaults to thinking that "Manger" should be "Manager"

If i invoke codespell --ignore-words-list Manger foo.txt it still suggests the correction, presumably because the codespell rule is manger->manager.

It would be nice to be able to ignore Manger while still letting codespell catch manger.

dkg@alice:~$ cat test.txt
William Manger is the project
manger in charge of excellence.
dkg@alice:~$ codespell test.txt 
test.txt:1: Manger ==> Manager
test.txt:2: manger ==> manager
dkg@alice:~$ codespell --ignore-words-list Manger test.txt 
test.txt:1: Manger ==> Manager
test.txt:2: manger ==> manager
dkg@alice:~$ codespell --ignore-words-list manger test.txt 
dkg@alice:~$ 

It would be nice if instead we got this:

dkg@alice:~$ codespell --ignore-words-list Manger test.txt 
test.txt:2: manger ==> manager
dkg@alice:~$ 
@peternewman
Copy link
Collaborator

I think this would only want to be an option at most. e.g. there's a protocol called ACN which some code I'm involved in supports, obviously that might exist in the codebase as both ACN and acn, so I just want to skip acn->can regardless of case.

I suspect the reality is this probably wants to be on a per-word basis, as mentioned elsewhere, adding that sort of thing to the ignore list gets complicated as you have to be able to escape them, but having say --ignore-words-list and --ignore-words-list-case-sensitive might be the solution perhaps...

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