You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect formatting behaviour when using SyntaxFactory.Block #63013
Version Used: 4.3.0-2.final (same behaviour with 4.3.0-3, but not with 4.3.0-1)
After updating the c# 11 test project in StyleCop.Analyzers to use a new Roslyn version, three tests (all called TestCodeFixProviderWithAlternateIndentationAsync) failed due to different formatting behaviour when adding braces around code in if statements (using SyntaxFactory.Block).
Since the release of Visual Studio 17.4 (Roslyn 4.4.0) this now happens IRL (as in "not just in tests") when applying the code fix for SA1503 in StyleCop.Analyzers. See DotNetAnalyzers/StyleCopAnalyzers#3581.
@tmat@jasonmalinowski This is blocking the use of the 4.4.0 Roslyn packages on NuGet. I believe this was serviced; we will need a new set of 4.4.1 packages uploaded to NuGet before the fix can be rolled out.
@sharwell There was a servicing fix for some VS for Windows related issues here, but those changes would only impact the reading of the settings in VS for Windows. Furthermore:
4.3.0-2.final (same behaviour with 4.3.0-3, but not with 4.3.0-1)
@tmat's change would have regressed in the 4.4 line, not in 4.3. So this very much seems to be an unrelated issue.
Activity
bjornhellander commentedon Nov 27, 2022
Any chance on getting some attention to this?
Since the release of Visual Studio 17.4 (Roslyn 4.4.0) this now happens IRL (as in "not just in tests") when applying the code fix for SA1503 in StyleCop.Analyzers. See DotNetAnalyzers/StyleCopAnalyzers#3581.
bjornhellander commentedon Nov 27, 2022
I added https://github.com/bjornhellander/BlockFormattingProblem as a simpler repro, in case it helps. It contains one test case which are run using two different versions of Roslyn. The test passes with the older version and fails with the newer.
CyrusNajmabadi commentedon Nov 27, 2022
@tmat sounds like maybe the same issue as the option serialization bug?
sharwell commentedon Nov 28, 2022
@tmat @jasonmalinowski This is blocking the use of the 4.4.0 Roslyn packages on NuGet. I believe this was serviced; we will need a new set of 4.4.1 packages uploaded to NuGet before the fix can be rolled out.
jasonmalinowski commentedon Nov 28, 2022
@sharwell There was a servicing fix for some VS for Windows related issues here, but those changes would only impact the reading of the settings in VS for Windows. Furthermore:
@tmat's change would have regressed in the 4.4 line, not in 4.3. So this very much seems to be an unrelated issue.