You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Codemaid Cleanup seems to cause indentation changes
Steps to recreate
Configure VS to use 2 spaces, no tabs, and disable adaptive formatting
Configure Codemaid using attached config
Create some sort of C# based project and open a .cs file
Trigger VS's native Format Document (indention should be 2 spaces)
Trigger Codemaid's Cleanup Active Document (indentation is now 4 spaces)
Current behavior
I have VS set to use a tab size of 2 spaces, with Adaptive Formatting disabled. If I run Visual Studio's native Format Document, the spacing is maintained. However if I use Codemaid's Cleanup Active Document, the indentation is changed to 4 spaces. This happens regardless of whether I use the menu entries or shortcut keys.
This occurs whether the Cleaning -> Visual Studio -> Run format document is enabled or disabled
This seems limited to .cs files, at least for me. I tried .cshtml, .html, .xml and .js files which work as expected.
Expected behavior
Codemaid's cleanup process should respect Visual studio's configured spacing CodeMaid.config.txt
It appears this was an issue with Visual Studio instead of Codemaid. Updating to 17.4.2 resolved it. I suspect it might be related to dotnet/roslyn#65382 and dotnet/roslyn#65360 which were resolved in this release.
Activity
Axemagus commentedon Nov 30, 2022
It appears this was an issue with Visual Studio instead of Codemaid. Updating to 17.4.2 resolved it. I suspect it might be related to dotnet/roslyn#65382 and dotnet/roslyn#65360 which were resolved in this release.