Bug Report T848932
Visible to All Users

Code Cleanup adds unnecessary parentheses even if the corresponding provider is set set

created 5 years ago

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

Show previous comments (2)
DevExpress Support Team 5 years ago

    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.

    J J
    J.R. van den Boom 5 years ago

      Here it is!

      DevExpress Support Team 5 years ago

        Thank you for the options. We have reproduced this issue. We will let you know when the fix is ready.

        Answers approved by DevExpress Support

        created 5 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.