Hi
After upgrading to CodeRush 19.1.6 the #region directives are not properly indented after running the "Format document" action as part of Code Cleanup.
The #region directives should be indented with the same indentation as the members it embeds, as it was the case in 19.1.5 and earlier versions.
CodeRush options (personal and solution team/personal) and screenshot are attached.
Thanks,
Zvonko
Hi Zvonko,
Thank you for contacting us.
I installed the product on the test computer and tried to reproduce the problem.
Code formatting works correctly for regions and does not shift them.
However, when I coped the solution settings you sent us into the solution folder, I managed to reproduce the problem.
CodeRush loads the settings incorrectly for some reason. I see two "Format document" actions in the list of the "Code Cleaup" options. See:
https://www.screencast.com/t/ivbVQPFggo.
I suppose it is the main reason why regions are formatted incorrectly.
I will continue investigating this problem and let you know of the results.
Please check if the "Code Cleanup" options contain two "Format document" actions on your side and if the problem is reproducible on a newly created solution without the personal and team options in the solution folder.
Hi Zvonko,
We've localized the problem.
It happens when Code Cleanup contains the "Format document" and "Organize members" actions and when "Organize members" has rules placed into the region directives.
Please give us some time to prepare the correction. We will contact you when it is ready.
Hi Eugene,
Great you found the problem, thank you.
However, your observation about the duplicates is correct. When I have .cr folder inside the solution, some of the actions in Code Cleanup section are duplicated. Not only "Format document" action, but other actions, too.
The content, which resides now inside of a .cr/team folder was copied from my global personal options folder. The goal was to "migrate" the personal options inside version control, to share / sync the CodeRush options across multiple computers I use for development. I thought maybe this was the issue for the duplicates and I changed the location of globa personal options folder to an empty folder. The issue is still there. Could you also check this issue, please?
Thanks,
Zvonko
Hi Zvonko,
Yes, we will investigate these issues as well.
To proceed in a more convenient manner I've created a separate ticket on your behalf (Code Cleanup options contain duplicated "Format document" actions) and placed it in our processing queue.
It will be answered shortly.