C# auto-formatter changes line terminators #3831
Labels
Area-IDE
Bug
Feature Request
IDE-CodeStyle
Built-in analyzers, fixes, and refactorings
IDE-Formatter
Code formatter and/or smart indent
Milestone
If I open a C# file which uses LF line endings and trigger a formatting operation (type a closing brace, format the document, etc.), any updated lines will have their terminators replaced with CRLF. Any new lines introduced will also use CRLF.
Depending on the tools being used, this can make for noisy code reviews, and having to go back and clean up these silent changes after the fact is inconvenient to say the least! It's especially unfortunate since the Visual Studio editor otherwise seems fairly smart about which type of terminator to use based on surrounding lines.
Existing lines should retain their line terminator, and, ideally, new lines should use some sort of heuristic, just like the VS editor.
The text was updated successfully, but these errors were encountered: