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

CS1998 Code Cleanup Fixer deletes comments at the end of the method #65380

Closed
vsfeedback opened this issue Nov 11, 2022 · 0 comments · Fixed by #76039
Closed

CS1998 Code Cleanup Fixer deletes comments at the end of the method #65380

vsfeedback opened this issue Nov 11, 2022 · 0 comments · Fixed by #76039
Labels
Area-IDE Bug IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
If you right click on Foo in the function below, and choose "Quick actions and refactorings" then "Remove async modifier" the fixer will incorrectly remove the //World comment, but correctly leaves the //Hello comment alone.

using System;
using System.Threading.Tasks;

namespace CodeCleanupError
{
    public class Class1
    {
        public async Task Foo()
        {
            //Hello 
            Console.WriteLine("Foo");
            //World
        }
    }
}

Original Comments

Feedback Bot on 11/8/2022, 04:31 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 11, 2022
@arunchndr arunchndr added Bug IDE-CodeStyle Built-in analyzers, fixes, and refactorings and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 11, 2022
@arunchndr arunchndr added this to the Backlog milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants