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

siw: respect 'files.exclude' preference #8433

Merged
merged 1 commit into from
Sep 14, 2020
Merged

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes: #7273

The following pull-request updates the search-in-workspace search to respect the files.exclude preference (which describes glob patterns for exclusion). Currently, the files.exclude preference is not respected and the search yields incorrect results such as **/*.git.

How to test

  • searching through the search-in-workspace should work correctly.
  • searching should not yield results which are described by the files.exclude globs.
  • overriding the default globs (using the boolean value) should work.
  • the newly added test case to test exclusion should work correctly.

Examples:

Exclude: **/*.git = true Exclude: **/*.git = false
Screen Shot 2020-08-25 at 6 30 24 PM Screen Shot 2020-08-25 at 6 30 38 PM

Review checklist

Reminder for reviewers

The commit updates the `search-in-workspace` search to respect
the preference `files.exclude` when performing searches.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Co-authored-by: Muhammad Anas Shahid <muhammad.shahid@ericsson.com>
@vince-fugnitto vince-fugnitto added the search in workspace issues related to the search-in-workspace label Aug 25, 2020
@vince-fugnitto vince-fugnitto self-assigned this Aug 25, 2020
Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

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

LGTM, was able to ignore patterns!

There's a discrepancy with the way VS Code handles patterns (.json on VS Code works like *.json on Theia) but it is fine to keep this for later improvements.

@vince-fugnitto
Copy link
Member Author

LGTM, was able to ignore patterns!

There's a discrepancy with the way VS Code handles patterns (.json on VS Code works like *.json on Theia) but it is fine to keep this for later improvements.

Thank you for the review, I'll leave the pull-request open for a couple of days so others can get a chance to verify as well 👍

Copy link
Contributor

@Anasshahidd21 Anasshahidd21 left a comment

Choose a reason for hiding this comment

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

The changes work well for me.

Tested on Gitpod.

@vince-fugnitto vince-fugnitto merged commit 4e000ce into master Sep 14, 2020
@vince-fugnitto vince-fugnitto deleted the vf/siw-files-exclude branch September 14, 2020 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
search in workspace issues related to the search-in-workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

search-in-workspace: does not respect 'files.exclude'
3 participants