Skip to content

Add option to exclude certain orphaned include files - #807

Merged
gewarren merged 1 commit into
dotnet:mainfrom
gewarren:exclude-include-orphans
Nov 4, 2026
Merged

gewarren merged 1 commit into
dotnet:mainfrom
gewarren:exclude-include-orphans

Conversation

@gewarren

@gewarren gewarren commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI balanced review requested due to automatic review settings November 4, 2026 20:16
@gewarren
gewarren requested a review from BillWagner November 4, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the change adding configurable orphaned-include exclusions.

No open issues 🎉

What changed in this PR

Adds configurable exclusions to cleanrepo’s orphaned-include scan so selected include files are not reported or deleted as orphans.

Changes:

  • Adds the optional ExcludeOrphanedIncludeFiles configuration list.
  • Matches exclusions case-insensitively by filename, absolute path, or path relative to the target directory.
File Description
cleanrepo/​Program.cs Passes exclusions into the scan and marks matching include files as referenced.
cleanrepo/​Options.cs Defines the optional include-file exclusion list.

Review effort: Balanced

@BillWagner BillWagner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This LGTM.

@gewarren
gewarren merged commit ba93ce0 into dotnet:main Nov 4, 2026
7 checks passed
@gewarren
gewarren deleted the exclude-include-orphans branch November 4, 2026 20:21
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.

3 participants