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
19.1k stars 4.04k forks source link

square bracket code style formatting #31861

Open vsfeedback opened 5 years ago

vsfeedback commented 5 years ago

When you change the spacing for square brackets in C# Code Style Formatting, the example does not reflect checking and unchecking the options and the editor does not respect the chosen formatting. For example, I have set it to add spaces inside square brackets as can be seen from the attached screenshot but when I format my document I do not get spaces inside the brackets.

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/408390/square-bracket-code-style-formatting.html VSTS ticketId: 751399 These are the original issue comments: (no comments) These are the original issue solutions: (no solutions)

sharwell commented 5 years ago

I was able to reproduce this bug for both .editorconfig and Tools→Options scenarios when using Open Folder instead of Open Solution. However, the behavior corrected itself when the folder was closed and reopened (which also occurs when Visual Studio is closed and reopened).