-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed as not planned
Closed as not planned
Copy link
Labels
Area-IDEBugResolution-Not ReproducibleThe described behavior could not be reproduced by developersThe described behavior could not be reproduced by developershelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on itThe issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
Description
Version Used:
.NET SDK 8.0.204
Steps to Reproduce:
The following code will report IDE0055 on line 2, but only if the file has CRLF line endings:
namespace Ide0055Bug
{
/// <summary>
/// test.
/// </summary>
#pragma warning disable TEST
[Serializable]
#pragma warning restore TEST
public class Class1
{
}
}The warning disappears if you either:
- change the file to LF
- remove the XML comment
- remove the pragma directive
I created a repo with a reproduction: https://github.com/mus65/Ide0055Bug
dotnet build reports:
Ide0055Bug/Class1.cs(2,2): error IDE0055: Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
dotnet format Ide0055Bug.csproj whitespace --verify-no-changes reports:
Ide0055Bug/Class1.cs(2,2): error WHITESPACE: Fix whitespace formatting. Replace 6 characters with '\n\s\s\s\s'. [Ide0055Bug/Ide0055Bug.csproj]
Ide0055Bug/Class1.cs(7,1): error WHITESPACE: Fix whitespace formatting. Replace 4 characters with '\s\s\s\s'. [Ide0055Bug/Ide0055Bug.csproj]
this was noticed in sshnet/SSH.NET#1380
Diagnostic Id:
IDE0055
Expected Behavior:
no IDE0055 warning.
Actual Behavior:
IDE0055 warning.
r-k-b
Metadata
Metadata
Assignees
Labels
Area-IDEBugResolution-Not ReproducibleThe described behavior could not be reproduced by developersThe described behavior could not be reproduced by developershelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on itThe issue is "up for grabs" - add a comment if you are interested in working on it
Type
Projects
Status
Completed