Skip to content

[CleanRepo] Add ability to filter subfolders #527

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

Merged
merged 2 commits into from
Jun 18, 2025

Conversation

gewarren
Copy link
Contributor

No description provided.

@gewarren gewarren requested a review from a team June 18, 2025 12:17
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

This LGTM @gewarren

I had one optional suggestion.

Comment on lines +800 to +801
if (!string.IsNullOrEmpty(subdirectoryPattern) &&
!subDirectory.FullName.Contains(subdirectoryPattern, StringComparison.OrdinalIgnoreCase))
Copy link
Member

Choose a reason for hiding this comment

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

I don't have a strong opinion, but here's the pattern matching alternative:

Suggested change
if (!string.IsNullOrEmpty(subdirectoryPattern) &&
!subDirectory.FullName.Contains(subdirectoryPattern, StringComparison.OrdinalIgnoreCase))
if (subdirectoryPattern is string pattern &&
!subDirectory.FullName.Contains(pattern, StringComparison.OrdinalIgnoreCase))

@gewarren gewarren merged commit 0c0dc87 into dotnet:main Jun 18, 2025
9 checks passed
@gewarren gewarren deleted the add-subfolder-filter branch June 18, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants