Skip to content

Random code cleanup found during repo merge work#13053

Merged
davidwengier merged 7 commits intodotnet:mainfrom
davidwengier:CodeCleanup
Apr 15, 2026
Merged

Random code cleanup found during repo merge work#13053
davidwengier merged 7 commits intodotnet:mainfrom
davidwengier:CodeCleanup

Conversation

@davidwengier
Copy link
Copy Markdown
Member

@davidwengier davidwengier commented Apr 15, 2026

When we merge into Roslyn we get a lot more analyzers running on our code. This fixes some of the warnings produced in the Roslyn build, plus some random dead code that I, or the build, found.

There are more warnings than just these, but these are things I consider objectively good :)

@davidwengier davidwengier requested a review from a team as a code owner April 15, 2026 07:17
return
// No allowed failures. Yay!
false;
return error switch
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not just suppress the warning?

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.

Could also Debug.Assert or somesuch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Honestly suppressing never occurred to me. Too much talking the AI out of suppressing everything it hits I guess

Copy link
Copy Markdown

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

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

:shipit:

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.

4 participants