Fix invalid csharp_space_around_declaration_statements option value#120201
Conversation
e5c42f3 to
811158f
Compare
|
Build Analysis is green. |
|
the original PR which added the option (dotnet/roslyn#15020) explicitly had ignore/do_not_ignore as options and there's also a test in roslyn that verifies this option parses the same as false. Maybe we should just update the docs? I'm mainly asking because this value is set in almost all .editorconfig files in the dotnet github org |
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
It doesn't look that PR actually implemented a |
|
@akoeplinger I've updated the PR description to show this is explicitly flagged as an error in JetBrains Rider. |
|
What Rider does is not relevant here IMO, they've probably just implemented what the docs say. https://github.com/dotnet/roslyn/blob/e628ec67ac5d6cf4ab52650cee1eee45a7738ff6/src/Workspaces/CSharpTest/Formatting/EditorConfigOptionParserTests.cs#L111-L118 shows the Roslyn test, the implementation just treats any value that is not Would you mind filing a roslyn issue about this? I don't particularly care what we set but there are over 60 hits in the dotnet org and I'm not sure it makes sense to just change runtime: https://github.com/search?q=org%3Adotnet+%22do_not_ignore%22+path%3A.editorconfig&type=code |
|
Opened dotnet/roslyn#80996 |
…dotnet#120201) The only valid option values are `ignore` and `false`. The default option value is `false`, so the invalid option value `do_not_ignore` was implicitly `false`. https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#csharp_space_around_declaration_statements <img width="1551" height="573" alt="image" src="https://github.com/user-attachments/assets/67d0bc2e-7e1a-4a6a-85a9-ff11f5632191" />
The only valid option values are
ignoreandfalse. The default option value isfalse, so the invalid option valuedo_not_ignorewas implicitlyfalse.https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#csharp_space_around_declaration_statements