Ticket T802425
Visible to All Users

Provide the capability to specify different code cleanup rules when running cleanup on save, from toolbar and via cleanup shortcut action

created 6 years ago (modified 6 years ago)

[DevExpress Support Team: CLONED FROM T802340: Code cleanup of attributes appears not to be working as it should]

Alex

Please accept my apologies, I should have thought to include them with the original ticket.

Whilst you look at that could you proffer some advice on one other rather annoying aspect of code cleanup, which I suspect quite rightly you'll say is almost unavoidable but which is a right royal pain in the but.

Let us suppose that you want to test something out in a code block that requires a reference to a particular assembly. Intellisense will prompt you to add the relevant using statement.

You test the feature and something breaks.  You debug it and comment some bits out (including the bit that needing the using statement) code cleanup strips out the using on the next build to test the modified code because builds involve a save.  Fix doesn't work so you uncomment the code and hey present you then have to re add the using because its missing and throwing errors.

You'll see that I have a shotcut option (Alt + M that I use to do a final cleanup of a file at the time that I know it's finished with.  Ideally that's when I would want to strip out all unused using's (including system .linq which it always seems to miss) but still keep the basic formatting on all save actions.

Hope this makes sense to you, but please ask if you need more information.

Comments (2)
DevExpress Support Team 6 years ago

    Dom,
     
    Thank you for the detailed explanation of your scenario. I agree with you that we need to improve how code cleanup is being configured and applied. We have discussed the possibility of adding support of code cleanup schemes for future versions of the product. As soon as we have any progress in this regard, we will update this ticket.

    DevExpress Support Team 5 years ago

      Hi Dom,

      We added the capability to apply different code cleanup settings in two scenarios: when calling the code cleanup action via a shortcut and when saving a document.
      The changes are available in the latest update.
      You can read more about the code cleanup settings at Code Cleanup settings

      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.