Resharper reformat changes line endings

Is there a setting to change it so that ReSharper leaves my lines alone? Nothing jumps at me.

An explanation of how I checked it below ...

It seems that when I use ReSharper and do a complete cleanup of the code, it will change my lines to CRLF, regardless of who they were before.

I proved it myself by opening the file in VS2010 by doing File -> Advanced Save Options and changing the line style to Unix (LF)

In Notepad ++, I turn on the outline of the view lines and only see LF at the end of the lines.

Then I do the ReSharper code cleanup, and CRLF appears everywhere.

+6
source share
2 answers

In Resharper / Options / Code editing / General formatting style / Default line ending style you can choose - Current OS | Windows | Mac | Unix

0
source

The end of a CRLF line is hardcoded in ReSharper since version 1.0.

The main reason for this is that VS runs on Windows, where the CRLF ends. Your project must be very special so as not to use the standard defaults for Windows text files

-3
source

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


All Articles