codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.88k stars 353 forks source link

Reorganize Active Document fails on C# records #1001

Open sloscialo opened 1 year ago

sloscialo commented 1 year ago

Environment

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; }
    }
  2. Execute Reorganize Active Document.
  3. Note that record is not sorted.
  4. Change record to class.
  5. Execute Reorganize Active Document.
  6. 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.

codecadwallader commented 1 year ago

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