How to make Rider 2019.1.1 to NOT format whitespace in all file?
Completed
Hi,
I am using JetBrains Rider 2019.1.1 in MacOS with C#, and every time I alter a source file, git detects a lot of whitespace changes in ALL file that I did not do that are very annoying.
The files are from a repository, and I do not know in which IDE were written (VS 2017 probably), but I do not want to reformat the file's whitespaces. I just want to modify the parts I am interested at.
How can I tell Rider to stop messing with the whitespaces ?
I do not want to ignore whitespace changes as GitHub diff can do, I want Rider to stop making such changes.
Please sign in to leave a comment.
The same problem in HTML. How to stop delete whitespaces automatically? I want to commit changes ONLY for lines I modify.
Hi!
Please try to set 'File | Settings | Editor | General | Strip trailing spaces on Save' to None and on
File | Settings | Editor | Code Style | C# | Spaces
tab change thePreserve Existing Formatting > Extra spaces inside
setting toLeave all extra spaces and tabs.
Is that are you looking for?
I do not have "Settings" but "Settings for New Solutions" in the "File" menu.
I went to "JetBrains Rider" menu, and click on "Preferences" (which went to the same place) and changed that setting, but Rider keeps messing all the whitespaces.
I just realised it is messing with the line breaks, probably because the files originated in a windows system. However I cannot find an option to stop Rider from changing them.
Any update on this issue?
I'm having the same problem with C++.
It looks like only the C# language has the full control over the whitespace preservation settings.
Note that it's considered bad coding practice to do unrelated formatting changes all over the file while you're modifying only certain lines in the file (i.e. mixing formatting and logic changes, creating problems with code merges,...). This should never be the default behaviour.
Is there a chance that you have "Remove trailing spaces on" configured under Preferences | Editor | General (On save) section?
Could you please update Rider to the latest 2019.2.2 version?
You can also try to in the `
Commit Changes
` window the `Ignore whitespaces (and empty lines)`
setting.Could you please attach some examples (files or screenshots) illustrating the problem?