Add trailing slash exclude paths #44330
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is in preparation for an upcoming change that'll allow us to exclude specific files. Right now, we were always adding a trailing "/" if one wasn't there and this was done to ensure that things didn't overmatch. For example, if you had sdk/foo and sdk/foobar with an exclude of sdk/foo, without the slash, it would overmatch sdk/foo and sdk/foobar. We were adding the trailing the slash to ensure that this didn't happen. Because always have a need to exclude specific files, adding the trailing slash won't allow this case to work.
This is the first change and it's a safe. Adding the trailing slash allows the removal of where we were doing this in Language-Settings.ps1. Note: There's still a place in eng/common Package-Properties.ps1 where this also has to be done before specific file excludes can be added.