-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
Some exclude patterns fail to apply to in-memory search results #6904
Comments
Updated the description. Also #930 is related/duplicate. |
@roblourens how does it work with RipGrep and our search.exclude patterns that are actually not absolute, e.g.: "search.exclude": {
"**/node_modules": true,
"**/bower_components": true
} Can RipGrep handle these or are we simply adding " |
No we don't need to - as ripgrep walks the tree, it encounters the folder |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
Update from bpasero:
The main issue is that our glob patterns are folder based (e.g. exclude
**/node_modules
) and not file based (e.g. exclude**/node_modules/**
). When we apply the patterns to in-memory editors and editor history we always pass in the full path of the resource and that makes the glob match fail. For search it works because we check the pattern on the parent folders already and return early if they match. The only fix I see for now is to change our default patterns to match on**/folder/**
instead of**/folder
.Original:
These steps repro on a node module where the search term is in a sub-directory. When a sub-directory is included it should search all files under the directory. This can really confuse users, I'm proof since I just tried to find
finishOutput
usages only to be told it's only referenced by its definition.Steps to Reproduce:
Adding
/**
or/**/*
to the files to include didn't make a difference.The text was updated successfully, but these errors were encountered: