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

Allow ripgrep to search files in hidden folders #7333

Merged
merged 1 commit into from
Mar 20, 2020
Merged

Allow ripgrep to search files in hidden folders #7333

merged 1 commit into from
Mar 20, 2020

Conversation

ishche
Copy link
Contributor

@ishche ishche commented Mar 13, 2020

Problem Description

vscode.workspace.findFiles ignores hidden folders.

How to test

  1. create .test/file.js file in the workspace.
  2. Call vscode.workspace.findFiles("**/*.js")

Old behavior:
search result empty

Now:
.test/file.js in result of search

OS and Theia version:
MacOs Theia from master.

Diagnostics:
Arguments for search in theia:

const args = ['--files', '--case-sensitive'];

But vscode has --hidden: https://github.com/microsoft/vscode/blob/955ff025c39bcc919e7b828bc14239215f6b20ad/src/vs/workbench/services/search/node/ripgrepFileSearch.ts#L33

Review checklist

@akosyakov akosyakov added the vscode issues related to VSCode compatibility label Mar 13, 2020
@vince-fugnitto
Copy link
Member

@ishche can you please squash your commits?
Do you have a sample vscode extension which calls the vscode.workspace.findFiles command so that reviewers can easily test your changes without the need to each create their own plugin?

Signed-off-by: Iurii Shchekochikhin <iurii.shchekochikhin@broadcom.com>
@thegecko
Copy link
Member

Would this return results in the .git folder if the workspace is under source control?

@akosyakov
Copy link
Member

akosyakov commented Mar 16, 2020

Would this return results in the .git folder if the workspace is under source control?

I think it would include .git always, at least if it is not excluded by workspace search preferences.

Actually we exclude them always already:

excludePatterns: ['*.git*']
so it should not change

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try it, .git seems to be always excluded from UI search, not sure how it is important for vscode api

@ishche
Copy link
Contributor Author

ishche commented Mar 16, 2020

@ishche can you please squash your commits?
Do you have a sample vscode extension which calls the vscode.workspace.findFiles command so that reviewers can easily test your changes without the need to each create their own plugin?

I've created a simple extension to test this PR. (also available in vscode marketplace)

To test it there, call Example: Find Files command. It will show a list of found files.

@akosyakov akosyakov merged commit 217460d into eclipse-theia:master Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants