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
update FindFiles2 to make options clearer #211494
base: main
Are you sure you want to change the base?
Conversation
export enum SearchIgnoreOptions { | ||
none = 1, | ||
localOnly = 2, | ||
localAndFollowSettings = 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which settings? does followSettings means to follow what's set in excludeSettingOptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means to follow the settings for global and parent ignore files-following. So using those settings to dictate whether to use them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the option be changed to followIgnoreSettings
or a note be added to the docstring then? Otherwise, I think it's really easy to mix up these followSettings keys with the exclude enum options and/or exclude settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that option 2 in this comment makes anything more clear? #205692 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this PR has the enum approach, I've been brainstorming better ways to go about this.
Fixes #205692
Edits the FindFiles2 API to be clearer in the exclude/ignore behavior.