Can I disable inconsistent line ending auto fix?

I'm working in a big team and the line ending of scripts is often inconsistent due to mac/windows editing.

I wanted to prevent rider from automatically change the line ending on save since it makes my merge resquests very hard to read. I think it should be normal when I do format the file, but it should at least ask for it if it wants to do it automatically.

Can you help me find this option if it even exists.


Comment actions Permalink


Rider does not edit the line endings of files on saving by default. It seems that you have .editorconfig in your project.

Would you mind checking if you have it? 
With this example:

end_of_line = lf

Once the .css file under `wwwroot/css/` is modified and saved, the line endings are updated to lf for this file.

The files that you create are being created with the line endings, defined from `File | Settings | Editor | Code Style`, but `.editorconfig` does override this setting on file save if the filename matches some pattern set in a config file.

There are different approaches how to manage the line endings in a multi-OS working environment. A different approach is to manage it via Git.
Might it be you use both approaches somehow, so they are conflicting?

Comment actions Permalink

Hi Dimitry!

Yes we found a way to handle this with git by making a formating commit before doing any change. Its not very fun, but it does the job.

One thing that I could suggest as an imporvement for this special case would be to implement a feature similar to the advanced saving options inside visual studio. I found out that when opening a file it'll tell you immediatly that the end of lines are inconsistent and ask for permission to fix it.


Comment actions Permalink

Hi Smasson99

Could you please try to change the `Line Separator` setting to a proper one in `File | Settings | Editor | Code Style` and check if it helps? Thank you! 


Please sign in to leave a comment.