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

Fix #59364 : Respect global .gitignore when searching #59717

Merged
merged 5 commits into from
Oct 4, 2018

Conversation

skprabhanjan
Copy link
Contributor

@roblourens , Here is the PR that fixes #59364 .
Please review the same and let me know if any changes are needed.
Thanks :)

@roblourens
Copy link
Member

This is a good start, but it needs to be hooked up to a setting so users can use it :)

Follow the example of the search.useIgnoreFiles setting, and follow the same naming convention.

Then the flag on the query also needs to be checked in the extension version of search - https://github.com/Microsoft/vscode/blob/master/extensions/search-rg/src/ripgrepTextSearch.ts#L350

@roblourens roblourens added this to the October 2018 milestone Oct 1, 2018
@skprabhanjan
Copy link
Contributor Author

@roblourens , Thanks for the review :)
I will work on these and get it fixed.

@skprabhanjan
Copy link
Contributor Author

@roblourens , Please check the changes now.
I have added a setting and also used the same naming convention.
My doubt was how to use that setting in the https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/search/node/ripgrepTextSearch.ts#L514 , where I had used a config property in IRawSearch interface(search.useIgnoreFiles example was not used here), I have kept that same as before, please let me know if that is fine or I need to change.
Thanks :)

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

You do need to use the setting somewhere, currently it is not hooked up to anything. For example the useIgnoreFiles setting is used here: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/search/common/queryBuilder.ts#L63

@skprabhanjan
Copy link
Contributor Author

@roblourens , I have followed the exact way that search.useIgnoreFiles was implemented.(Taking into account both the review feedbacks that you gave).
Please review this and let me if there are any changes :)
Thanks for the constant feedback and help :)

@roblourens
Copy link
Member

It looks like the build has an issue

@skprabhanjan
Copy link
Contributor Author

skprabhanjan commented Oct 2, 2018

It looks like the build has an issue

I checked that before pushing and all the errors are related to test files and few of them are due to the "disregardGlobalIgnoreFiles" flag that was added and others were related to something else, I did not know if I had to fix that build issue.
So what should I do in this regard and also if you can let me know if the actual changes are okay?
Thanks :)

@skprabhanjan
Copy link
Contributor Author

Hey @roblourens , sorry for that build failure error, it was my bad.
I fixed it now, can you please check it once again :)
Thanks :)

@roblourens
Copy link
Member

roblourens commented Oct 3, 2018

I added one comment to the code but everything else looks good. But the QueryBuilder tests are still failing because now this extra property is added to the query. So could you just update them so they pass?

Then I see CompletionModel tests also failing, I'm not sure about those. You could merge the latest from master into your PR branch to check whether it's something else from master or your code. If it's not from your change we can ignore that one...

@skprabhanjan
Copy link
Contributor Author

@roblourens , Fixed all the changes and QueryBuilder tests are now working.
Also I ran the ./scripts/test.sh locally and did not find anything failing.
Thanks :)

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Great work, thanks!

@roblourens roblourens merged commit 38a2c24 into microsoft:master Oct 4, 2018
@skprabhanjan skprabhanjan deleted the fix-59364 branch October 4, 2018 19:03
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Respect global .gitignore when searching
3 participants