Bug Report T558098
Visible to All Users

Formatting - Comments are duplicated when spacing options are used

created 7 years ago

[DevExpress Support Team: CLONED FROM T557130: New Space formatting issues]
Hi Alex,

I've installed and HF and the above 3 issues have been fixed… BUT a NEW one has been introduced.

It's on the Formatting>Spacing>Statement option – when this is turned ON the below issue happens… The comment line in the code below is duplicated each time the code cleanup button is pressed. So before it has one line, then after 3 presses it looks like the after section:

NOTE - this happens if i have either Spaces or Tabs selected for indenting.

BEFORE:

C#
public static string GetHashSha256(string text) { byte[] bytes = Encoding.UTF8.GetBytes(text); var hashstring = new SHA256Managed(); // a comment byte[] hash = hashstring.ComputeHash(bytes); return GetStringFromHash(hash); }

AFTER 3 cleanup clicks:

C#
public static string GetHashSha256(string text) { byte[] bytes = Encoding.UTF8.GetBytes(text); var hashstring = new SHA256Managed(); // a comment // a comment // a comment // a comment // a comment // a comment // a comment // a comment byte[] hash = hashstring.ComputeHash(bytes); return GetStringFromHash(hash); }

This is only 3 clicks on the code cleanup button I have in the tool bar (I have to always click it 3 times to do a full clean up of the file.

For now, I have to leave the "Statement" option unchecked due to this.

Show previous comments (1)
AM AM
Alan Middleton999 7 years ago

    Super, Thanks Alex :)

    AM AM
    Alan Middleton999 7 years ago

      Hi, Excellent, just downloaded the HF and had no issues this time :)  Thanks for the quick fixes guys!

      DevExpress Support Team 7 years ago

        You are welcome.

        Answers approved by DevExpress Support

        created 7 years ago (modified 7 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.