Hi,
I have configured CodeRush to not use optional parentheses (in the C# Programming Style settings). However, during code cleanup it changes this line
C#string[] lines = { logMessage, ex.Message, ex.InnerException?.Message ?? string.Empty };
into this
C#string[] lines = { logMessage, ex.Message, (ex.InnerException?.Message ?? string.Empty) };
where logMessage is a string and ex is an Exception.
Bug or feature?
Regards,
Joost
Hello,

Please go to the Options-Editor\C#\Code Cleanup options page and check if these checkboxes are turned on? If so, then turn them off and let us know if this helps.
Turning off this option is not a solution, because then unnecessary parentheses are not removed anymore. If you look at the example in your screenshot you see that this option removes unnecessary parentheses, but in the code I wrote unnecessary parentheses are added.
Regards,
Joost
Would you please provide us with your CodeRush options. Navigate to the menu item CodeRush\Support\Settings Folder…, zip the opened folder and paste it here. The CodeRush solution options are needed too. You can find them in the /your solution/.cr directory.
We want to reproduce this behavior with your settings.
Here it is!
Thank you for the options. We have reproduced this issue. We will let you know when the fix is ready.