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

Wrong string detection with version 1.15.0 and 1.16.0 #1251

Closed
sbrunner opened this issue Sep 13, 2019 · 7 comments
Closed

Wrong string detection with version 1.15.0 and 1.16.0 #1251

sbrunner opened this issue Sep 13, 2019 · 7 comments

Comments

@sbrunner
Copy link

With a js file like that

a = 'Missing files';

I get the error:

test.js:1: files'  ==> file's
@peternewman
Copy link
Collaborator

I think that's expected, this system doesn't currently inspect the code, so doesn't realise you're quoting a string and hence assumes you've got an errant apostrophe.

@sbrunner
Copy link
Author

Then why it was working in version 1.14.0?
Is it possible to ignore this kind of errors?

@peternewman
Copy link
Collaborator

Then why it was working in version 1.14.0?

Because that correction was only added in the change between the two:
v1.14.0...v1.16.0#diff-3bddc99f1f6dffc98ea11be5a5a31ae9R8677

Is it possible to ignore this kind of errors?

Yes, you can whitelist either specific lines or corrections, see the man pages/help for Codespell.

@sbrunner
Copy link
Author

OK, thanks :-)

@larsoner
Copy link
Member

Sounds like this is resolved enough, closing

@sbrunner
Copy link
Author

It's not fixed I just found a workaround...

@peternewman
Copy link
Collaborator

It's not fixed I just found a workaround...

I think a proper fix for this would need a full code parser for example you can't just check if there is a preceding single quote due to scenarios like this where it should flag the issue:

a = 'Foo's files' live here';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants