-
Notifications
You must be signed in to change notification settings - Fork 471
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
[2.2.2 regression] Codespell tries and fails to decode and fix .git\objects
files
#2539
Comments
While I can reproduce this issue, I wonder whether it is really a regression. Indeed, I had similar errors with former versions of codespell, see #2189. When just reading files, without
When attempting to fix files, with
Could it be that codespell used to skip |
As for the following warnings, they are indeed new and the result of 900f186, yet they are expected. It's just that the encoding detection code used to have a bug, and this bug has been fixed by 900f186.
|
So I should probably let codespell ignore my |
Does just We should ignore hidden files already as per e.g.: Do the tests pass on Windows for you? I suspect it's a bug somewhere, but I don't know if it's our hidden directory checking, or our Windows behaviour or something else... |
I still wonder why you cannot reproduce this issue with prior versions of codespell. I seem to be able to trigger this error with codespell 2.2.0:
|
OK, it appears codespell skips hidden files but does not skip hidden directories reliably. That has always been the case, hence the need to explicitly skip
As you can see, it's all a question of depth. Hidden files and files directly under a hidden directory are skipped. Files in subdirectories of hidden directories are not skipped. This is not a 2.2.2 regression, it is just not a known bug. I guess you were lucky not to hit the bug before. Will have to modify the call to os.walk and make sure we use the default
|
Using Codespell 2.2.2 on Python 3.10 in a Git repository, Codespell errors with an permission error trying to modify Git objects:
This behaviour was not present in Codespell 2.2.1 (I tested that multiple times on multiple branches) so I think it's a 2.2.2 regression.
Full log:
The text was updated successfully, but these errors were encountered: