Skip to content

REFL008 adds using directive with improper line ending #228

Open
@jnm2

Description

@jnm2

VS 16.5.0. Repro:

using System.Linq;
using System.Threading;

class C
{
    void M()
    {
        typeof(C).GetMethod(nameof(M));
    }
}

Apply the fix:

using System.Linq;
using System.Reflection;
using System.Threading;

class C
{
    void M()
    {
        typeof(C).GetMethod(nameof(M), BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
    }
}

Then save, close the file, and reopen:

image

Maybe it's using SyntaxFactory.LineFeed instead of SyntaxFactory.ElasticLineFeed? Though I would have expected the formatter to take care of both.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions