Current filter:
                                You should refresh the page.
                                  • Hi

                                    I think that code cleanup may have been slightly broken by the last update.

                                    Please take a look at the Linked video screencast

                                    As you can see although attributes are correctly broken apart they are not listed as the setting within the options would suggest that they should be.

                                Show all comments
                                • Alex Z (DevExpress) 07.30.2019

                                  Dom,
                                   
                                  Thank you for the screencast. Would please also attach your CodeRush settings ("CodeRush\Support\Settings Folder..."), so I can use them to reproduce this issue locally?

                                • Dom Sinclair 07.30.2019

                                  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.

                                • Alex Z (DevExpress) 07.30.2019

                                  Hello,
                                   
                                  Thank you for the settings files. We need some time to research the issue.
                                  As for the code cleanup question, I've created a separate ticket on your behalf (T802425: Ability to specify different code cleanup rules when running cleanup on save, from toolbar and via cleanup shortcut action).
                                  It has been placed in our processing queue and will be answered shortly.
                                   
                                   

                                • Alex Z (DevExpress) 07.30.2019

                                  Dom,
                                   
                                  I have reproduced the code cleanup issue using your settings. We need some time to research it.

                                • Dom Sinclair 08.26.2019

                                  Alex

                                  Can you tell me if 19.1.8 will fix the following scenario.

                                  Code rush settings are as per zip file above.

                                  I am working through adding some code to a class which needs / requires some thing about (as it affects licencing issues).  there are a number of constant strings to be declared, some complex, which will be used later on in the code.  The complexity of the strings means that I want to save them as I go, but code cleanup, bless it, is stripping them out.

                                  I think you need to think seriously about stripping out the code formatting aspects of code cleanup (which I really value) to a separate CR option group so that one can always have that (activated on save).  The rest of code cleanup needs so clearly defined rules so that  you can apply so or all of it at different stages of a class file's life.  As things stand code cleanup is fast becoming more trouble than it's actually worth, which is a great shame because it could be so useful if only it didn't go at things like a bull in a china shop.

                                  Dom

                                • Alex Z (DevExpress) 08.27.2019

                                  Dom,

                                  Thank you for the additional comment and provided feedback.
                                  We will consider adding an ability to configure code cleanup rules for document saving in the context of the following tickets:
                                  T802425
                                  T746402

                                  As a workaround I can suggest you disable running code cleanup on document save and apply it from the tool bar action.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed: