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

/, _, ., etc before or after natively ignored item (guid, hash, etc) causes it to be spell checked #481

Closed
repi opened this issue May 1, 2022 · 5 comments · May be fixed by #483
Closed
Assignees
Labels
bug Not as expected

Comments

@repi
Copy link

repi commented May 1, 2022

In part of our code base we had a set of comments referencing text from a backtrace, with lines like this that triggers as typos with this tool:

error: `ba` should be `by`, `be`
  --> ./src/panic.rs:94:45
   |
94 |     ///                 at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\rt.rs:51

the same long hexadecimal number by itself in a comment doesn't trigger though (probably thanks to the fix for #326).

///  testing:  c7087fe00d2ba919df1d813c040a5d47e43b0fe7

Is there, or should there be, some specific detection of paths so it doesn't spellcheck the path itself or does detect that one directory here was really a long hexadecimal number and should be treated just as a separate hexadecimal number is?

@epage
Copy link
Collaborator

epage commented May 2, 2022

Created tests for various combinations in #483. Specifically the issue is having an ignored token next to another ignored token (escape sequences). We don't gracefully handle that.

A workaround is to change the paths to use / exclusively until this is fixed.

@repi
Copy link
Author

repi commented May 3, 2022

Thanks! Will try the workaround also.

Also had some issues with a JWT token that had a big JSON text embedded into it with very long encoded strings for the crypto keys that also had some essentially paths in it

@repi
Copy link
Author

repi commented May 7, 2022

Can confirm that replacing \/ in the paths that failed on with / fixed the false positives here, thx!

@epage epage changed the title Support/ignore long hexadecimal in paths? /, _, ., etc before or after natively ignored item (guid, hash, etc) causes it to be spell checked May 10, 2022
@epage epage self-assigned this May 10, 2022
@epage epage added the bug Not as expected label May 10, 2022
epage added a commit to epage/typos that referenced this issue May 10, 2022
@epage epage closed this as completed in bd5048d May 10, 2022
@epage
Copy link
Collaborator

epage commented May 10, 2022

v1.8.0 is released with a fix for this

@repi
Copy link
Author

repi commented May 11, 2022

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants