You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Behaviour of ignore-words-list seems different than a single ignore pattern (the latter has to match its case as in the dictionarty):
-L WORDS, --ignore-words-list WORDS
comma-separated list of words to be ignored by
codespell. Words are case sensitive based on how they
are written in the dictionary file.
Say I have typo titel in target file, and using pattern titel works while TITEL doesn't (as expected). Then I have another typo Mater in target file, and using both Mater/mater seems to work (why? the dict entry is mater and I didn't find another entry as Mater).
For example for test file (as .py):
titel=0Mater=1
# Expected behaviour
>>> codespell --ignore-words-list titel test_words_list.py
test_words_list.py:3: Mater ==> Matter, Master, Mother
>>> codespell --ignore-words-list TITEL test_words_list.py
test_words_list.py:1: titel ==> title
test_words_list.py:3: Mater ==> Matter, Master, Mother
# Unexpected, why both Mater and mater work (dict entry is "mater")
>>> codespell --ignore-words-list Mater test_words_list.py
test_words_list.py:1: titel ==> title
>>> codespell --ignore-words-list mater test_words_list.py
test_words_list.py:1: titel ==> title
The text was updated successfully, but these errors were encountered:
DanielYang59
changed the title
Behaviour of ignore-words-list seem different than a single ignore pattern
Unexpected behaviour of ignore-words-list when handling cases
Nov 21, 2024
Behaviour of
ignore-words-list
seems different than a single ignore pattern (the latter has to match its case as in the dictionarty):Say I have typo
titel
in target file, and using patterntitel
works whileTITEL
doesn't (as expected). Then I have another typoMater
in target file, and using bothMater/mater
seems to work (why? the dict entry ismater
and I didn't find another entry asMater
).For example for test file (as
.py
):The text was updated successfully, but these errors were encountered: