-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Code formatter does not respect csharp_space_after_keywords_in_control_flow_statements editorconfig setting #1564
Comments
Apologies for the delay here - @johan-gorter can you confirm this is still not working on the latest versions of the c# extension (2.59.14 prerelease)? It seems to be working as expected for me: If it isn't working - can you confirm if the .editorconfig is shown in the sln explorer correctly and next to or above the cs file? |
I updated to pre-release versions (C# 2.60.26, C# Dev Kit 1.15.13) And still the .editorconfig setting is still ignored. My .editorconfig looks like this:
Could you give me yours, to see if another editorconfig setting is influencing this one? |
@dibarbet, the 'needs-more-info' label has been removed upon receiving further response from the original bug filer. |
@dibarbet sorry for the late reply by the way |
@johan-gorter no worries - I have been OOF for a bit as well. I'm able to see the setting work with the same editorconfig:
I suspect there is some issue with either the project loading or the location of the editorconfig file. Are you able to share what you see in the solution explorer, and where the .editorconfig file is in relation to the file being formatted? |
Describe the Issue
When (auto)formatting our code, the setting
csharp_space_after_keywords_in_control_flow_statements = false
is ignored and spaces are added afterif
andforeach
statements. According to the documentation, the .editorconfig file is used for formatting.Steps To Reproduce
Have a .editorconfig file with the following contents:
And a simple
Program.cs
Execute the action
format document
, and observe the space appearing afterif
, although the .editorconfig specifies it shouldn't.Expected Behavior
I expect the space not to be added by the code formatter.
Environment Information
OS: Windows
VSCode version: 1.94.2
C# Dev Kit version v1.11.14
The text was updated successfully, but these errors were encountered: