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

Not all spacing options work as expected for C# files #26996

Open vsfeedback opened 6 years ago

vsfeedback commented 6 years ago
  1. Tools > Options > Text Editor > C# > Code Style > Formatting > Spacing
  2. Toggle the checkbox for "Set other spacing options" > "Insert space after cast"
  3. Note that the code in the preview window doesn't change when the checkbox is toggled (it always behaves as if the checkbox is unchecked). See attached screenshot.

This is not just a problem with the preview window. It also affects the way Edit > Advanced > Format Document/Selection works.

Other spacing options -- but not all -- show the same behavior. For instance, "Insert spaces within parentheses of control flow statements" works but "Insert space within parentheses of expressions" does not.

This is a regression, but I don't know how recent it is.

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/237798/not-all-spacing-options-work-as-expected-for-c-fil.html VSTS ticketId: 604163 These are the original issue comments: (no comments) These are the original issue solutions: (no solutions)

jcouv commented 6 years ago

Tagging @jinujoseph as this sounds like a possible regression.

Neme12 commented 6 years ago

Just a question: I'm getting Access Denied on the link to developer community. Is this expected? I'm still able to access other feedback items, so it seems to be related to this particular one. Are some feedback items private to Microsoft?

sharwell commented 6 years ago

Are some feedback items private to Microsoft?

Yes, but it doesn't readily tell us which is which. In this case, the feedback item has no comments and the text is reproduced verbatim above.

jmarolf commented 6 years ago

@Neme12 looks like the reason you can't access this one is it was reported by a Microsoft employee so there is more contact info than there would normally be.

Neme12 commented 6 years ago

Thanks. I usually click the link to see the version used because it's not copied to GitHub.

jmarolf commented 6 years ago

@Neme12 yeah, that's another reason you can't access it. It could be a version number for a VS that isn't released yet. In this case though it was 15.7.1.

Neme12 commented 6 years ago

Are the internal version numbers secret? I see them very often in issues created by team members, for example: #27010

jmarolf commented 6 years ago

@Neme12 I mean the roslyn team doesn't care in most cases (surprise there is going to be a VS 15.8 someday! 😃 ) but the devdiv internal processes are more conservative about this sort of thing.