Disable ReSharper code reordering during code reformat?

I use the ReSharper code reformatting tool to get some standard format for my code, but I don't like the way it moves methods.

For example, if I rename a method and then reformat it, the method moves. This makes merging changes between branches a nightmare.

Is there any setting that I skipped that would disable this particular part of reformatting?

+4
source share
2 answers

To do this, you need to change the XML layout of the member type. In this file you have several templates that you can modify or delete to get the desired behavior. All changes made to this file will be displayed in the following file:

C:\Documents and Settings\user\Program Data\JetBrains\ReSharper\v4.5\vs8.0\UserSettings.xml

so that you can make a backup before playing with it or add it to the source tree.

+1
source

Set up your own R # profile

Click Resharper> Tools> Clear Code

Then select "Edit Profiles", add a new profile, deselect what you do not want, and save.

Run this profile in the future.

+3
source

Source: https://habr.com/ru/post/1338824/


All Articles