Skip to content
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

Handle new naming inspections on certain enums #28051

Merged
merged 8 commits into from
May 2, 2024

Conversation

frenzibyte
Copy link
Member

All enum fields by default should follow the pascal-case naming style, unless there's a specific reason not to (e.g. p/invoke).

If an enum field is named after a specific abbreviation, said abbreviation should be added to rider configuration in this manner:

CleanShot 2024-05-01 at 17 29 07

There are existing fields in general that can benefit from the abbreviation feature (e.g. HpDrain), but I've abstained from including them here.

@@ -489,6 +489,7 @@ internal struct NvApplication
public static uint Stride => (uint)Marshal.SizeOf(typeof(NvApplication)) | (2 << 16);
}

// ReSharper disable InconsistentNaming
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Can we use [SuppressMessage("ReSharper", "InconsistentNaming")] instead? I really dislike the disable/restore pairs.

If that's not feasible, I'd just disable at a file level

https://github.com/ppy/osu-framework/blob/63405204eba19d054f24c8f349137129a1557936/osu.Framework/Graphics/Sprites/FontAwesome.cs#L8

@frenzibyte frenzibyte requested a review from peppy May 1, 2024 19:13
@peppy peppy merged commit fb4a304 into ppy:master May 2, 2024
11 of 17 checks passed
@frenzibyte frenzibyte deleted the fix-naming-inspections branch May 2, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants