In the process of testing this project, I noticed that some files were ending up with a mixture of LF and CRLF line endings. It seems that Roslyn only updates the line endings on lines that are touched in some way, while other lines maintain their original endings. As such, if a file is formatted with LF line endings, and formatted with CRLF as the target, it can end up with mixed endings.
It looks like dotnet format has a dedicated formatter for this specific purpose. I would recommend something similar here as well.
In the process of testing this project, I noticed that some files were ending up with a mixture of LF and CRLF line endings. It seems that Roslyn only updates the line endings on lines that are touched in some way, while other lines maintain their original endings. As such, if a file is formatted with LF line endings, and formatted with CRLF as the target, it can end up with mixed endings.
It looks like
dotnet formathas a dedicated formatter for this specific purpose. I would recommend something similar here as well.