Ticket T751377
Visible to All Users

Exclude file from code cleanup

created 6 years ago

Hi,

I have CodeRush configured to perform code cleanup/organize members etc when I save a file.
I would like to know if it is possible to exclude a particular file from this?

Thanks,

Andrew.

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

    Andrew, maybe we may be able to provide you with a quicker solution to the problem. In order to more thoroughly assess the complexity of the task, we need to get more information about your problem.

    Could you please describe in more detail why you want to exclude some files from the Code Cleanup? What is the content of these files? How can we determine that these files should be excluded: a specific file name, some members have a specific attribute/region, etc? Maybe some CodeCleanup rule works incorrectly in these files and you want the possibility of excluding these rules only?

    I'm looking forward to your reply.

      Hey Andrew,
      We have the same problems and would like such a feature as well because if there are changes in a WinForm, the designer file gets formatted as well. To clarify, i don't make the changes in the designer file myself, it's just the auto-generated code. The problem there is performance. For a designer file with about 5.8k lines of code, the saving process takes about 7 minutes. This occurs every time i have a change in a Form file, which makes the tool (and especially the auto-format on save function) absolutely useless to us. As for the form itself, its basically just a file with a RichEdit and all your office ribbon functions added. In this case, we wouldn't want to exclude a file depending on it's content but it's name (similar to a gitignore on a file because of it's name/it's type/it's extension).

      DevExpress Support Team 6 years ago

        Hi,

        Thank you for your comment. To process it more efficiently I've created a separate ticket on your behalf: Code Cleanup - The 'Apply Code Cleanup when saving a document' option should ignore designer generated files

        Let's continue our discussion there.

        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.