Open Alexander-Shukaev opened 9 months ago
I actually tested that very use case yesterday in the context of #3206, and it worked for me:
$ mkdir test
$ cd test
/tmp/test
$
$ cat > aare.txt
aare
$ codespell .
aare.txt:1: aare ==> are
$
$ cat > aadd.txt
aadd
$ codespell .
./aadd.txt:1: aadd ==> add
./aare.txt:1: aare ==> are
$
$ cat > ignore.txt
aare
aadd
$ codespell .
./aadd.txt:1: aadd ==> add
./aare.txt:1: aare ==> are
./ignore.txt:1: aare ==> are
./ignore.txt:2: aadd ==> add
$
$ codespell --ignore-words ignore.txt .
$
There are two ways to handle such a situation:
--ignore-words
lists the word to ignore, these words will be ignored, including in the files passed as argument to --ignore-words
. No real need to skip these files.I guess codespell uses mechanism 1. The right thing to do would be to switch to mechanism 2, but this would require other PRs such as #2058 to be merged first. So let's stick to mechanism 2 for now. I guess your issue is a case issue similar to #3248. You should be able to take care of it by fixing the case of the words to ignore, or by testing master branch that includes recent PR #3272.
Does this help?
As per title, otherwise
codespell
fixes the ignore file itself which makes no sense anyway.