Fix recent warnings seen on Rider 2024.3 #6443
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.
Not fully sure if this is caused by new Rider update or something else, I've navigated back to a point before #6434 was merged but it's not relevant, not to mention that the warnings fixed by this PR completely come from ReSharper, so they're not relevant to that PR anyway.
Fix enum naming warnings
This one was actually seen in ppy/osu as well half a year ago: ppy/osu#28051
It seems that it would be better to exclude enum members from naming rule inspections, but apparently that's not possible to do at all. Enum members are being treated the same as public fields/properties, and since we apply the pascal case rule to those, enum members are being affected as well.
This is an issue with Rider that was reported a long while ago but has not been fixed until now. For the time being, any existing enum causing a warning has been individually silenced until Rider responds or otherwise (there are rare enums which renaming them or adding abbreviations to silence them is viable so I've done that for them).
Demote "usage of default struct equality" inspection to hint
Looks to be a new Rider inspection, it's firing off as warnings in the following two places (screenshots were taken after severity was changed to hint):
Made it a hint for now, not confident about touching the source generation codebase just to appease this inspection (@smoogipoo you might be interested though)