Skip to content

LeadingComments affect breaking #149

Closed
@belav

Description

@belav

This affects ConstructorDeclarationSyntax and BaseMethodDeclarationSyntax.
IfStatementSyntax was easy to pull out the LeadingTrivia. This was less obvious. But looking at that may help.

Expected Formatting

namespace SomeNamespace
{
    public class ClassName
    {
        public void Exactly80(IApplicationBuilder app, IWebHostEnvironment env)
        {
            return;
        }

        // this shouldn't affect breaking
        public void Exactly80(IApplicationBuilder app, IWebHostEnvironment env)
        {
            return;
        }
    }
}

Actual Formatting

namespace SomeNamespace
{
    public class ClassName
    {
        public void Exactly80(IApplicationBuilder app, IWebHostEnvironment env)
        {
            return;
        }

        // this shouldn't affect breaking
        public void Exactly80(
            IApplicationBuilder app,
            IWebHostEnvironment env
        ) {
            return;
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions