You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A file with a namespace, some blank lines, and a comment, eg:
test.cs:
namespaceEv2Deploy.Models.Kubernetes.ATS.PublicCloud.Regions.Canary;//public class EUS2EUAP : CanaryRegionBase
Run dotnet csharpier test.cs
Output:
same file, with an additional blank line between namespace and comment
namespaceEv2Deploy.Models.Kubernetes.ATS.PublicCloud.Regions.Canary;//public class EUS2EUAP : CanaryRegionBase
Rerunning csharpier again usually, but not 100%, adds another blank line, so the gap gets bigger and bigger. I think it is deterministic but there's some factor I don't quite understand which defines whether an extra line is added - CRLF vs LF maybe?
If I use the Visual Studio extension and 'reformat with csharpier' it adds an extra line every time.
Expected behavior:
I assume we'd want 1 blank line between namespace and comment.
Csharpier version 0.30.4
The text was updated successfully, but these errors were encountered:
This was fixed in #1408 which went out in 0.30.4 but if you were testing it on the playground that was still at 0.30.2 because the deploy was failing. Playground is up to date now.
Is there more in the file that is causing the issue? The logic to fix the issue is a bit of a hack and I imagine there could be other ways file ending comments cause an extra blank line.
I take that back, my hack only works if the file starts with a single blank line above the comment, with your file there is more than one so it continues to add new lines.
Input:
A file with a namespace, some blank lines, and a comment, eg:
test.cs:
Run dotnet csharpier test.cs
Output:
same file, with an additional blank line between namespace and comment
Rerunning csharpier again usually, but not 100%, adds another blank line, so the gap gets bigger and bigger. I think it is deterministic but there's some factor I don't quite understand which defines whether an extra line is added - CRLF vs LF maybe?
If I use the Visual Studio extension and 'reformat with csharpier' it adds an extra line every time.
Expected behavior:
I assume we'd want 1 blank line between namespace and comment.
Csharpier version 0.30.4
The text was updated successfully, but these errors were encountered: