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

Remove redundant partial modifier on type declaration #7533

Open
xtqqczze opened this issue Jan 16, 2025 · 0 comments
Open

Remove redundant partial modifier on type declaration #7533

xtqqczze opened this issue Jan 16, 2025 · 0 comments

Comments

@xtqqczze
Copy link
Contributor

Brief description:

This analyzer identifies partial types (classes, structs, or interfaces) declared with only a single part in the codebase. The partial modifier is intended for types split across multiple files, and using it unnecessarily can cause confusion or clutter. The analyzer suggests removing the partial modifier unless additional parts are expected.

Languages applicable:

This analyzer is applicable to C# and VB.

Code example that the analyzer should report:

public partial class MyClass
{
    public void DoSomething() { }
}

The analyzer should not report when there are multiple parts of the type.

Additional information:

https://www.jetbrains.com/help/rider/PartialTypeWithSinglePart.html

Documentation requirements:

When this analyzer is implemented, it must be documented by following the steps at Documentation for IDE CodeStyle analyzers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant