.editorconfig and Code Cleanup question
I struggle to find information about the following:
- Which Visual Studio Code Cleanup setting affects
IDE0059? I can't find it in https://learn.microsoft.com/en-us/visualstudio/ide/code-styles-and-code-cleanup?view=vs-2022 - Regarding
IDE0059is it possible to have the following config values prefer to not use any unused value assignment whatsoever?
These are my settings, which I applied after a code cleanup added unwanted_ =in my code:csharp_style_unused_value_assignment_preference = discard_variable:none csharp_style_unused_value_expression_statement_preference = discard_variable:none
I.e. I want to preferfun();instead of_ = fun();orint unused = fun();.
The only options I see for these variables arediscard_variableandunused_local_variable, and even if I find the answer to question 1, I doubt a new cleanup will remove the_ =instead of ignoring them.
I assume "Find and Replace" is the best option in this particular case?
Here's the doc forIDE0059for reference: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0059?pivots=lang-csharp-vb
Learn how to configure Visual Studio to apply code style preferences using the Code Cleanup (Visual Studio 2019) and Format Document (Visual Studio 2017) commands.

