[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.
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.
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