codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

Cleanup code not working correctly (tab space increases in every code cleanup)

Open neroqfi opened this issue 3 years ago • 1 comments

Environment

  • Visual Studio version: 2019 Professional
  • CodeMaid version: 12.0
  • Code language: C#

Description

This code starts to adjust to the right in every Cleanup Active Document command:

public IBindCommand UseCommand => CreateCommand(async (input) =>
{
          return null;
});

         /**** Cleanup code ****/

public IBindCommand UseCommand => CreateCommand(async (input) =>
          {
                       return null;
          });

Expected behavior

The code adjustment stays in the correct tab space.

->

public IBindCommand UseCommand => CreateCommand(async (input) =>
{
          return null;
});

         /*** Cleanup code ***/

public IBindCommand UseCommand => CreateCommand(async (input) =>
{
          return null;
});

neroqfi avatar Jan 27 '22 14:01 neroqfi

Thanks for reporting the issue. I am able to reproduce it. It appears to be tied to the explicit access modifiers logic which due to a new SDK bug has caused a number of issues. There's more information on #879 including a link to the SDK issue.

As a workaround for now you could disable the options at CodeMaid->Options->Cleaning->Insert->Insert explicit access modifiers.

codecadwallader avatar Feb 06 '22 20:02 codecadwallader