dotnet/roslyn

AbstractSuppressionCodeFixProvider replaces LF with CRLF

Open

#69,358 opened on Aug 3, 2023

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-IDEBughelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

Version Used: Version 17.8.0 Preview 1.0 [33916.57.main]

Steps to Reproduce:

This issue tracks multiple disabled tests in code.

  1. Open a file with LF line endings in a project with end_of_line unset (Windows only) or explicitly set to CRLF
  2. Place the caret on a line with a diagnostic
  3. Suppress the diagnostic via the light bulb with a #pragma warning disable or #Disable Warning

Expected Behavior:

The file retains its LF line endings, including on the two newly inserted lines.

Actual Behavior:

The file has mixed line endings.

Contributor guide