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
dotnet format will not place a new line (as configured in .editorconfig) after the open braces ('{') character in a catch(){} block if it's empty
To Reproduce
Please refer to this repo for source code.
The command fails to format a file according to IDE2001 (set on the .editorconfig in the repo) if the embedded statement is an empty block (in this case, a catch{} block)
It seems that the issue happens specifically when a semicolon is inserted after the closing bracket, which the command interprets as an embedded statement
Bug Description
dotnet format
will not place a new line (as configured in .editorconfig) after the open braces ('{') character in acatch(){}
block if it's emptyTo Reproduce
Please refer to this repo for source code.
The command fails to format a file according to IDE2001 (set on the .editorconfig in the repo) if the embedded statement is an empty block (in this case, a
catch{}
block)Further technical details
dotnet --info
:.NET SDK (reflecting any global.json):
Version: 6.0.425
Commit: fcce060d9f
Runtime Environment:
OS Name: fedora
OS Version: 40
OS Platform: Linux
RID: fedora.40-x64
Base Path: /home/luizschmidt/.dotnet/sdk/6.0.425/
global.json file:
Not found
Host:
Version: 6.0.33
Architecture: x64
Commit: 6c636980f7
.NET SDKs installed:
6.0.425 [/home/luizschmidt/.dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.33 [/home/luizschmidt/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.33 [/home/luizschmidt/.dotnet/shared/Microsoft.NETCore.App]
Download .NET:
https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info
Visual Studio Code
1.95.0
912bb683695358a54ae0c670461738984cbb5b95
x64
The text was updated successfully, but these errors were encountered: