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

ignore token like text #3558

Open
rbalet opened this issue Sep 6, 2022 · 6 comments
Open

ignore token like text #3558

rbalet opened this issue Sep 6, 2022 · 6 comments

Comments

@rbalet
Copy link

rbalet commented Sep 6, 2022

Describe the solution you'd like
I assume it will be hard to achieve if not impossible

Some time we have to add token in our app, like the google api one or such.

here, for example, we got 3 error when it should just be ignored.
image

Describe alternatives you've considered
I know it does exists ways to ignore specific text (in case we would like to use the same token every where) but ignoring all of them would be easier.

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 6, 2022

@rbalet,

I have thought about this issue, but have not come up with a good detection solution. I think it is a fun problem.

It is a form of Automatic Language Identification and Detection. If the score is too low, then it should be considered a token.

That challenge here is that it needs to be:

  1. fast
  2. low memory usage.

It is an entropy measurement.

@rbalet
Copy link
Author

rbalet commented Sep 6, 2022

@Jason3S Yes, I wanted to add an Idea but could figure it out. Maybe someone out there have it.

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 6, 2022

@rbalet,

I have had some ideas, but haven't had the time to try them. out.

@max-carroll-sky
Copy link

One idea I had is if we could have a comment annotation that switched on an ignore beased on a regex pattern, one of our devs has come up with a regex that picks up tokens really well, but it also picks up other things like strings in enums in typescript if we could have something like

// cspell ignore pattern start '[\w_=:-.{}[]“,?]{15,}'

"SOME_OBSURE_KEY_TOKEN" : "asjdflkasdjfa;osdkfj;orgijeaopijergfo"

// cspell end ignore pattern

then we could at least constrain it to certain bits of files

@ssbarnea
Copy link
Contributor

ssbarnea commented Dec 4, 2024

I want to configure cspell to ignore spelling sequences like this as this is causing lots of false positives and noise, especially when using cspell vscode extension.

@Jason3S
Copy link
Collaborator

Jason3S commented Dec 5, 2024

@ssbarnea,

#6615 should help address this issue. But, there needs to be a bit more tuning before it lands.

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

No branches or pull requests

4 participants