Current filter:
                                You should refresh the page.
                                  • Hello DevExpress Support!

                                    I experienced a code duplication if I'm saving a file which has invalid formed statements inside.

                                    All comments appearing after the invalid code part will be duplicated.


                                    namespace ConsoleApp7
                                        class Program
                                            static void Main(string[] args)
                                                // comment
                                                Console.WriteLine("Hello World!");

                                    If you save that with code formatting on save from CodeRush enabled the //comment will be duplicated. If you save it again all two lines of comments will be duplicated and so on.

                                    Steps to reproduce:

                                    1. Create a new solution with a project (e.g. a .NET Core Console application)
                                    2. Go to CodeRush settings and enable under Editor->C#->Formatting->Code Cleanup the option "Format document"
                                    3. Copy the code from above or just write your own code where there are comments below an invalid statement
                                    => result should be that all comments until the next valid statement is duplicated

                                    Yours sincerely,

                                • Alex Eg (DevExpress) 06.05.2019

                                  Hi Gerald,
                                  Thank you for the detailed explanation. Our formatting engine is intended to work with valid code and calling it on the wrong syntax can cause unexpected behavior. Please give us some time to research the issue and see if we can fix the issue in this case.

                                1 Solution

                                Creation Date Importance Sort by