Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoveAndSort Functionality Clarification #23

Open
broderickt2 opened this issue Jul 19, 2024 · 1 comment
Open

RemoveAndSort Functionality Clarification #23

broderickt2 opened this issue Jul 19, 2024 · 1 comment

Comments

@broderickt2
Copy link

broderickt2 commented Jul 19, 2024

I want to confirm I am not using this wrong. Is the RemoveAndSort supposed to run when saving a file as well and doing the bulk format? The impression I am getting is that when I save a file, this program would do all of the necessary formatting I enabled (cleaning up or adding whitespace, removing extra imports, etc). I am saving a .cs file by the way.

When I save a file that has extra whitespace and click save, it cleans up the whitespace. But is it also supposed to remove unused/extra imports at the top with the save? Upon saving a file or doing the bulk format, it seems the using/import statements at the top are not cleaned up in my files. Here are my current settings:
image

Here is what I am using:
Microsoft Visual Studio Enterprise 2022 (64-bit) Version 17.10.2

Am I using this wrong or misunderstanding? Or is there an issue with functionality maybe?

@tifish
Copy link
Owner

tifish commented Aug 20, 2024

You are right. The RemoveAndSort should run when saving a .cs file.

But the SmartRemoveAndSort may prevent RemoveAndSort if the .cs file contains #if statement, because RemoveAndSort might do wrong thing in such case.

Sorry for the late reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants