codecadwallader/codemaid

Code Maid Visual 2022 - Making Tabs larger/Smaller than stated in Visual Studios native document formatting setting

Moorepheus opened this issue · 7 comments

Environment

  • Visual Studio version: 2022 Pro (17.4.1)
  • CodeMaid version: 12.0
  • Code language: C#

Description

When CodeMaid is calling the Code Cleanup, all the tabs/indents are not following the Visual Studio's native document formatting settings. I have tried this on clean install of both VS and CodeMaid.

Current behavior

CodeMaid is usin the Visula Studio's default document formatting settings vs using what the user changed those settings to.

Expected behavior

CodeMaid should use the upated settings instead of the default Visual Studio settings.

I re-opened this, but I was able to see that this might be an issue with regard of this tool and re-sharper. I am going to close this ticket.

Okay, I thought Resharper was causing this issue, but it is not, I have uninstalled resharper, so I only have CodeMaid extension installed and I can repo this issue.

Attached is a video showing how to repo it.

https://app.screencast.com/CzCS04QmN0tcI

Thanks for reporting the issue and sharing a video. I have not been able to reproduce it yet. CodeMaid does not directly change the indentation of the file, but instead invokes Visual Studio's native formatting.

https://github.com/codecadwallader/codemaid/blob/dev/CodeMaidShared/Logic/Cleaning/CodeCleanupManager.cs#L552

This is the same command that you were demonstrating in the video, but clearly there was something different happening between the two commands.

Can you please provide an export of your CodeMaid settings and that minimal solution that was exhibiting the issue?

Steve
Thanks for getting back to me. I have just got a new computer, clean build, I will build a sample solution, send you our settings file for CodeMaid and show you screenshots of VS 2022 settings for tabs/etc. I will get to that some time today.

Thanks again,

Steve Thanks for getting back to me. I have just got a new computer, clean build, I will build a sample solution, send you our settings file for CodeMaid and show you screenshots of VS 2022 settings for tabs/etc. I will get to that some time today.

Thanks again,

So, brand new clean build, this is not happening, the issue above is not happening. Very weird. We have many machines here, that this is happening on. I have reset the VS environment to default and still the same issue on these machines. I will try to narrow down the difference between the machines that are having this issue and this new clean build machine.

It seems it was a VISUAL STUDIO version issue or an environment issue. After Upgrading my VS 2022 to the latest update, the problem is gone. really weird, anyway, thanks for looking into this,

Closing ticket, as I believe this was an VS 2022 issue, either with the version number we were using or the environment, as after upgrading to the latest release, the problem went away.