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

RCS1228: incomplete fix, multiple unused params and a return -> last param isn't removed #1584

Open
eduherminio opened this issue Nov 21, 2024 · 0 comments · May be fixed by #1585
Open

RCS1228: incomplete fix, multiple unused params and a return -> last param isn't removed #1584

eduherminio opened this issue Nov 21, 2024 · 0 comments · May be fixed by #1585
Assignees

Comments

@eduherminio
Copy link
Member

When there are > 1 unused <param> before a <returns> (used or not), last unused <param> isn't removed.

Repro:

    /// <summary>
    /// Foo
    /// </summary>
    /// <param name="a"></param>
    /// <param name="b"></param>
    /// <returns>a + b</returns>
    public int Foo(int a, int b) => a + b;

Expected output:

    /// <summary>
    /// Foo
    /// </summary>
    /// <returns>a + b</returns>
    public int Foo(int a, int b) => a + b;

Current output:

    /// <summary>
    /// Foo
    /// </summary>
    /// <param name="b"></param>
    /// <returns>a + b</returns>
    public int Foo(int a, int b) => a + b;

Fix can be re-applied once there's only one param left

Roslynator v4.12.0, VS 2022 ,.NET 9

@josefpihrt josefpihrt self-assigned this Nov 22, 2024
@josefpihrt josefpihrt linked a pull request Nov 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants