Bug Report T433235
Visible to All Users

"Organize Members" should not remove line breaks after a list of usings

created 8 years ago

If I check "Remove existing line breaks" and also set every "Empty line count between…" to 1 in the StyleCop rule schema, the code is formated as expected, with one little annoying exception:

The empty line between the usings and the first class is always removed.

Before:

C#
namespace ClassLibrary1 { using System; using System.Collections.Generic; using System.Linq; public class Class1 { private List<string> test1; public void Call1() { } public void Call2() { } } }

After:

C#
namespace ClassLibrary1 { using System; using System.Collections.Generic; using System.Linq; public class Class1 { private List<string> test1; public void Call1() { } public void Call2() { } } }

I haven't found any setting to change this.

Thanks
Silvio

Comments (1)
DevExpress Support Team 8 years ago

    Hello Silvio,

    Thank you for pointing out this issue and providing the code sample.

    The list of usings is not a part of members of namespace, and so we agree that "Organize Members" should not remove line breaks after them.

    We are researching this issue and will let you know when we have any results.

    Answers approved by DevExpress Support

    created 8 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.