Skip to content

Extra blank line added to file each time csharpier runs on this file #1426

@edyoung

Description

@edyoung

Input:

A file with a namespace, some blank lines, and a comment, eg:

test.cs:

namespace Ev2Deploy.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

namespace Ev2Deploy.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions