Skip to content

1.0.2

Compare
Choose a tag to compare
@belav belav released this 24 May 16:27
· 45 commits to main since this release
07491be

What's Changed

Performance issues when supporting .gitignore. #1588

CSharpier was using a naive algorithm for parsing and evaluating gitignore rules that caused significant perfomance issues. @kevinboss reworked the implementation to drastically increate performance.

Exclude bin/ and obj/ directory content from xml formatting #1600

CSharpier now excludes all files in bin/ and obj/ by default.

Error on syntactically valid conditional with is #1612

The following c# is valid and compiles with 9.0.300+. CSharpier was updated to properly parse it.

var x = y is y ? [] : z ?? [];

Xml formatting with comments in text element inserts extra new lines #1607

CSharpier has some issues with formatting text that contained xml comments. That has been improved.

Input & expected output

<NoWarn>
  CA1031; <!-- Since this is not a library project, catching general exceptions is OK -->
  IDE0005; <!-- Allow unused usings -->
</NoWarn>

1.0.1

<NoWarn
    >
      CA1031;
    <!-- Since this is not a library project, catching general exceptions is OK -->

    
      IDE0005;
    <!-- Allow unused usings -->
</NoWarn>

Inconsistent formatting of single-line lambda expressions #1594

CSharpier 1.0.0 introduced a regression that caused the following formatting. This is now working as expected.

// input & expected output
        CallMethod(() => CallAnotherMethod______________________________________________________());
        CallMethod(() =>
            CallAnotherMethod______________________________________________________1()
        );
        CallMethod(() =>
            CallAnotherMethod______________________________________________________12()
        );
        CallMethod(() =>
            CallAnotherMethod______________________________________________________123()
        );

// 1.0.0
        CallMethod(() => CallAnotherMethod______________________________________________________());
        CallMethod(() => CallAnotherMethod______________________________________________________1()
        );
        CallMethod(() => CallAnotherMethod______________________________________________________12()
        );
        CallMethod(() =>
            CallAnotherMethod______________________________________________________123()
        );

Full Changelog: 1.0.1...1.0.2