Current filter:
                                You should refresh the page.
                                  • Hello,

                                    I know it sounds like a joke, but:

                                    When using CodeCleanup with option remove all comments, excluding XML comments (in a VB project)

                                    Does it make sense to remove task based comments in a method? They are removed..
                                    ( you can't use XML comments in a method, so there would be no possibility for comments in methods at all..)
                                    Also I thought at least comments at the end of a line should not be removed (?) I found a ticked which I don't find anymore with a fix for that (in version 17 something as far as I remember..?)

                                    Thanks a lot,
                                    Franz

                                    Edit: the ticket I didn't find before is: T538172

                                • Franz Scharf 01.22.2019

                                  As the ticket T538172 was probably targeting another issue and I also saw a request for 'detect commented out code' I think I should change this in a feature request:

                                  Actually I would love to remove many of commented out code in an old project but keep all task based comments.
                                  So far I didn't find a possibility to do this with the CodeCleanup feature.

                                  Thanks again,
                                  Franz

                                • Alexander K (DevExpress) 01.22.2019

                                  Hi Franz,

                                  Thank you for pointing out this issue. We agree that the "Remove all comments" rule should not affect on task based comments. We are working to correct it.

                                  As for the ticket that you mention, it related to the "Convert to string.Empty" rule. So, the Code Cleanup removes comments at the end of a line if the "Remove all comments" rule is enabled. We don't plan to change this behavior.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed:

                                • Franz Scharf 02.14.2019

                                  First of all: thank you so much for implementing this feature in the latest version.

                                  Please let me point out 2 other things:
                                  In Visual Studio it's possible to add tokens that will appear in the task list (this are also task based comments)
                                  Do you think it's possible to take this comments in account also?

                                  I think the idea of removing all comments is mostly to remove comment out code.
                                  But sometimes you need comments like 'NOTE: don't forget to change this if you change that .
                                  For that reason you would add NOTE as task based comment.
                                  If comments with user defined tokens would also not be affected that would be a great help too.

                                  The second thing is not a big issue but:
                                  In Visual Studio the task list is not case sensitive.
                                  It also lists 'ToDo' and not just 'TODO'.
                                  CodeRush colors this comments only if you use upper case and also removes 'ToDo' comments.
                                  The developers will decide if they want to take that in account or not.
                                  I just wanted to make sure you are aware of that fact.

                                  Thanks a lot and sorry for my bad English :-),
                                  Franz

                                • Alexander K (DevExpress) 02.15.2019

                                  Hi Franz,

                                  Thank you for pointing out to these issues. We will correct the check of task-based comment tokens to make it case-insensitive. Also, we will research the possibility of providing support for custom tokens that are defined in Visual Studio. We will inform you of our progress.

                                • Alexander K (DevExpress) 02.21.2019

                                  Hi Franz,

                                  We have corrected the "Remove all comments" code cleanup rule in such a way that it doesn't remove comments from the Task List window anymore. It applies to comments that start case-insensitively with standard and custom tokens.

                                  The check for special comments in the Rich Comments is case-insensitive now as well. Take note that custom tokens that are defined in Visual Studio are not counted in the Rich comments feature.

                                  These changes will be available starting with CodeRush 18.2.8. We have prepared a special build with these changes that you can use now: DevExpress.CodeRush.Roslyn-18.2.7.19052.vsix.

                                • Franz Scharf 02.22.2019

                                  Hi Alexander,

                                  thank you very much!!
                                  It's already a big help..

                                  I noticed that the rich comments feature already works with custom tokens.
                                  But.. if you have NOTE as a custom token and this code:
                                     '#NOTE This file is auto-generated; do not modify it directly.  To make changes,
                                      'NOTE or if you encounter build errors in this file, go to the Project Designer
                                      'NOTE (go to Project Properties or double-click the My Project node in
                                      'NOTE Solution Explorer), and make changes on the Application tab.
                                      Public Sub New()
                                          InitializeComponent()
                                      End Sub
                                  after cleanup you get one line with all notes and at the end of this line you find the Public Sub New()

                                  But I know it's still a beta.. again: thank you so much,
                                  Franz

                                • Alexander K (DevExpress) 02.22.2019

                                  Hi Franz,

                                  You are welcome.

                                  To process the issue from your last post more efficiently, I've created a separate ticket on your behalf: Code Cleanup - The 'Remove all comments' rule removes line breaks between task-based comments. Let's continue our discussion there.