dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.88k stars 4.01k forks source link

Remove trailing space after <enter> between arguments (etc.) #940

Open dpoeschl opened 9 years ago

dpoeschl commented 9 years ago

Inspired by all of the trailing spaces that were removed by the CodeFormatter in #933

  1. Paste C#:
class C
{
    void M(string a, string b)
    {
        M("Dog", "Cat");
    }
}
  1. Place the caret before "Cat" and press enter

Expected: The "Cat" argument is moved to the next line and the previous line's trailing space is removed. Actual: The trailing space is left on the previous line.

Dev12 had the same behavior, so this is not a regression.

alexsorokoletov commented 9 years ago

would be somewhere in Workspaces\CSharpWorkspaces\Formatting\Rules @Pilchie

Pilchie commented 8 years ago

There is an existing .editorconfig rule for this. We should look at obeying it.