You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an afterthought, maybe all occurences of non-elastic should be looked at and fixed if needed. I only saw these being used: CarriageReturnLineFeed Space Whitespace
Version Used:
2.8.0-beta3-62728-05
Steps to Reproduce:
Expected Behavior:
EOL settings should be respected
Actual Behavior:
In some cases, CRLF or LF are inserted regardless of document options.
Analysis:
From what I've seen, the offending code is using
SyntaxFactory.CarriageReturnLineFeeddirectly: http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp.Workspaces/Utilities/UsingsAndExternAliasesOrganizer.cs,14From what I understand, maybe
SyntaxFactory.ElasticCarriageReturnLineFeedshould be used instead, so the formatter call from here uses the right EOL endings:http://source.roslyn.io/#Microsoft.CodeAnalysis.Features/AddImport/References/Reference.cs,134
http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/CodeActions/CodeAction.cs,275
As an afterthought, maybe all occurences of non-elastic should be looked at and fixed if needed. I only saw these being used:
CarriageReturnLineFeed
Space
Whitespace