Skip to content

Style fixes (.NET 9 SDK) - #21643

Merged
penev92 merged 6 commits into
OpenRA:bleedfrom
RoosterDragon:net9-style
Nov 15, 2024
Merged

Style fixes (.NET 9 SDK)#21643
penev92 merged 6 commits into
OpenRA:bleedfrom
RoosterDragon:net9-style

Conversation

@RoosterDragon

Copy link
Copy Markdown
Member

If you're using the .NET 9 SDK that came out yesterday (or e.g. updated Visual Studio which ships it) then some of the style rules have been updated and trigger additional warnings locally. We can also except them to be flagged by CI if the runners move to .NET 9, even if we continue to specify .NET 6 or .NET 8 as the build target.

Fix these issues to improve the local dev experience for anybody using this SDK:

> dotnet --version
9.0.100

See also #21211

@RoosterDragon
RoosterDragon marked this pull request as draft November 13, 2024 19:23
@RoosterDragon

RoosterDragon commented Nov 13, 2024

Copy link
Copy Markdown
Member Author

CI giving quite a few errors not surfacing on a local run :)

Edit: Fixed!

@RoosterDragon
RoosterDragon force-pushed the net9-style branch 4 times, most recently from 04c1a2f to 32926dd Compare November 13, 2024 19:44
@RoosterDragon
RoosterDragon marked this pull request as ready for review November 13, 2024 19:53
Comment thread OpenRA.Game/MiniYaml.cs
Comment thread OpenRA.Mods.Common/Widgets/LabelWithHighlightWidget.cs
Don't enforce all the rules yet, since we are still targeting .NET 6.

Adjust cast to nullable in UnloadCargo.ChooseExitSubCell. Avoid this cast tripping up CA2021 on older NET SDK versions.

@penev92 penev92 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.

Thank you.

@penev92
penev92 merged commit bf7f81b into OpenRA:bleed Nov 15, 2024
@penev92

penev92 commented Nov 15, 2024

Copy link
Copy Markdown
Member

Changelog

@RoosterDragon
RoosterDragon deleted the net9-style branch November 15, 2024 20:37
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