-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
** in search.exclude glob should work the same way it did before #24050
Comments
In my settings files.exclude, I had
|
The problem is with the second ** in the pattern |
Mine won't search either with RipGrep enabled. My search exclusions looks like this: Note that the rest of my code does not exist in any of those folders, so I'm not sure why it isn't being searched correctly. |
Same reason @GunslingerBara - you have |
@roblourens The most correct would not the VS Code ignore incorrect globs, rather than impact the searches? |
Yeah, I need to either validate them or map |
@roblourens / @rdmdouglas Thanks for the suggestions. It was an incorrect glob pattern on my I'll close this for now. Feel free to reopen if you want to use this issue to discuss how to properly handle incorrect globs. |
The current error behavior of "search completely stops working for no apparent reason" leaves a LOT to be desired, especially since incorrect globs used to work (meaning a lot of people have them in config files). Any/all of the following would be better:
|
The main issue right now is that I don't actually have a great way to validate a glob. The error message doesn't tell me which glob is problematic. The best I can come up with for the near-term is to spawn ripgrep for an empty search once per glob to tell whether it produces an error message. Either ahead of time to validate globs, or after a search to match the error message to a particular glob. It would be great to load the right Rust crate as a native node module sometime later so I can validate globs quickly and in process. Another possibility would be writing the globs to an ignore file in /tmp, since bad globs in an ignore file don't prevent the search from running. |
@roblourens If improving an error message would help you, I'd be open to that. :-) There's also a possibility that ripgrep should support invalid constructs like |
… rg to get a better error message for bad globs.
The resolution here is
|
@roblourens I see the error in output channel but not anywhere else.. Is it expected? |
Edit: One of my exclusion globs was not valid.
"**/**$$*.java": true
should be changed to"**/*$$*.java": true
Steps to Reproduce:
settings.json
set"search.useRipgrep": false
My `settings.json`
The text was updated successfully, but these errors were encountered: