-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix invalid csharp_space_around_declaration_statements option value
#120201
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
base: main
Are you sure you want to change the base?
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 |
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