Bug Report T1231440
Visible to All Users

Code Formatting - Blank line rules for auto-implemented properties do not work correctly

created 10 months ago

Hi,

I have configured CodeRush to maintain a blank line between properties/methods etc. This works fine UNLESS:

  1. a property is auto implemented AND
  2. has a default value AND
  3. the following property has an attribute attached.

In the attached sample, you can see the spacing is correctly applied to Id, IsHeld, LoanProductName, NodAmount and NodDate as they do not have default values assigned, or the following field does not have an attribute assigned. All other fields do not have the spacing applied as they fall into one of the above 3 categories.

Am I missing something?

Cheers,
John

Comments (3)
AE AE
Alex Eg (DevExpress) 10 months ago

    Hi John,

    Please share your CodeRush settings (CodeRush\Support\Settings Folder) and specify the exact CodeRush feature you use - Formatting, Code Cleanup, or Organize Members. We need this information to reproduce and research the issue.

      Hi Alex,

      Settings attached.  I use the Format Document option set up via Editor | C# | Formatting | Blank lines.

      Cheers,
      John

      AE AE
      Alex Eg (DevExpress) 10 months ago

        John,

        Thank you for sharing this information. I reproduced the issue. Please give us some time to research it. We will update this ticket when we have news.

        Answers approved by DevExpress Support

        created 10 months 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.
          Comments (3)
          PW PW
          Przemyslaw Wlodarczak (DevExpress) 9 months ago

            John,

            Do you mind if we make this ticket public, so that we can include it in the list of fixed issues for the next release?

              That’s fine.

              Cheers,
              John

              AE AE
              Alex Eg (DevExpress) 9 months ago

                John,

                Thank you for your cooperation.

                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.