codespell-project / codespell

check code for common misspellings
GNU General Public License v2.0
1.87k stars 469 forks source link

.codespellrc file doesn't work #3216

Closed jcubic closed 10 months ago

jcubic commented 10 months ago

I just added a config file from the command that I used to ignore node_modules (that should be ignored by default even if it's a Python tool).

Unreadable video ![Peek 2023-11-14 18-46](https://github.com/codespell-project/codespell/assets/280241/6df4042f-09ac-4c00-b7cb-d5d7001a12bd)
DimitriPapadopoulos commented 10 months ago

How doesn't it work? Please change the video into a static attached log, I cannot read anything on the video.

jcubic commented 10 months ago

It process node_module directory that is in skip:

this is part of the log:

./node_modules/@puppeteer/browsers/lib/cjs/fileUtil.js.map:1: AAdD ==> add
./node_modules/@puppeteer/browsers/lib/cjs/fetch.js.map:1: EACf ==> each
./node_modules/@puppeteer/browsers/lib/cjs/fetch.js.map:1: EACf ==> each
./node_modules/@puppeteer/browsers/lib/cjs/launcher.js.map:1: EACf ==> each
./node_modules/@puppeteer/browsers/lib/cjs/launcher.js.map:1: EACf ==> each
./node_modules/@puppeteer/browsers/lib/cjs/launcher.js.map:1: EACf ==> each
./node_modules/@puppeteer/browsers/lib/cjs/launcher.js.map:1: CACH ==> CATCH, CACHE
./node_modules/@puppeteer/browsers/lib/cjs/launcher.js.map:1: CACL ==> CALC
./node_modules/@puppeteer/browsers/lib/cjs/launcher.js.map:1: CACL ==> CALC
./node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map:1: CACL ==> CALC
./node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map:1: DAA ==> DATA

This also doesn't work: codespell --config .codespellrc it processes node_modules.

This is my config file:

[codespell]
skip = "./node_modules*,./assets/*,./dist/*,./package-lock.json,./lib/srfi/*"
DimitriPapadopoulos commented 10 months ago

This works for me:

[codespell]
skip = ./node_modules*,./assets/*,./dist/*,./package-lock.json,./lib/srfi/*
DimitriPapadopoulos commented 10 months ago
$ cat .codespellrc 
[codespell]
skip = ./node_modules*,./assets/*,./dist/*,./package-lock.json,./lib/srfi/*
$ 
$ cat node_modules/fileUtil.js.map 
AAdD
$ 
$ codespell
$ 
$ rm .codespellrc 
$ 
$ codespell 
./node_modules/fileUtil.js.map:1: AAdD ==> add
$ 
jcubic commented 10 months ago

It doesn't work on my Fedora. Do you have codespell installed from pip, or do you execute it from source?

DimitriPapadopoulos commented 10 months ago

Have you seen the difference between our .codspellrc files? My post was unclear, I actually changed the .codespellrc file.

jcubic commented 10 months ago

Yes I've seen the quotes

jcubic commented 10 months ago

ok, I've found the error I had missing comma, I've deleted assets directory in same time. A silly mistake. Sorry for the trouble. The tools is great, thanks for creating it.