codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

Reorganize Active Document fails on C# records

Open sloscialo opened this issue 2 years ago • 1 comments

Environment

  • Visual Studio version: 2022 Enterprise 17.6.2
  • CodeMaid version: 12.0
  • Code language: C#

Description

Nothing happens when "Reorganize Active Document" is executed for record types.

Steps to recreate

  1. Create a new C# file with the following record:
public record Foo
{
    public string B { get; set; }
    public string A { get; set; }
    public string C { get; set; }
}
  1. Execute Reorganize Active Document.
  2. Note that record is not sorted.
  3. Change record to class.
  4. Execute Reorganize Active Document.
  5. Note that class has been sorted:
public class Foo
{
    public string A { get; set; }
    public string B { get; set; }
    public string C { get; set; }
}

Current behavior

Reorganize Active Document fails when subject is a record.

Expected behavior

Reorganize Active Document should be able to reorganize a record.

sloscialo avatar May 25 '23 19:05 sloscialo

Thanks for reporting the issue. CodeMaid has not yet been updated to support record. Related issue #767

codecadwallader avatar Jul 22 '23 21:07 codecadwallader