Bug Report T1051772
Visible to All Users

Formatting - Type Arguments spacing options conflict with StyleCop

created 3 years ago (modified 3 years ago)

Hello DevExpress-Supportteam,

I have a problem I would need your help with. It revolves around the Option C# -> Formatting -> Spacing -> Type Arguments -> Insert space after a seperator (comma). No matter if I activate or deactivate it, in a certain case I always get a warning. I made a small example to visualize the problem:

C#
// Before cleanup: no warnings var type1 = typeof(IComparer<,>); var type2 = typeof(IComparer<string, string>); // After cleanup with Insert space after a seperator (comma) activated var type3 = typeof(IComparer<, >); // Warning SA1015: Closing generic brackets should not be preceded by a space var type4 = typeof(IComparer<string, string>); // After cleanup with Insert space after a seperator (comma) activated var type5 = typeof(IComparer<,>); var type6 = typeof(IComparer<string,string>); // Warning SA1001: Commas should be followed by whitespace

Could you please advise how i can solve this problem?

Thanks a lot, and have a nice day,
Michael

Show previous comments (1)
DevExpress Support Team 3 years ago

    Hi Michael,

    We added the "Insert space after a separator (comma) when type arguments are omitted" option to separate rules of formatting in your case. This option is disabled by default. So, if you enable the "Insert space after a separator (comma)" option, then CodeRush formatting should work correctly. We prepared a build with a new option:

    DevExpress.CodeRush-21.2.5.21362.exe
    DevExpress.CodeRush-21.2.5.21362.vsix
    DevExpress.CodeRush.Dev17-21.2.5.21362.vsix

    Please install it and let me know whether it solves the issue.

    MB MB
    Michael Breunig 3 years ago

      Hello Alexander,

      I can confirm that this fixed it.

      Thanks a lot, and have a nice day,
      Michael

      DevExpress Support Team 3 years ago

        You are welcome, Michael. Have a nice day too.

        Answers approved by DevExpress Support

        created 3 years ago

        We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

        Important Notes:

        • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
        • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.

          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.