Skip to content

Commit

Permalink
Fix warnings when building in linux due to IDE0055 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardCooke committed Sep 13, 2024
1 parent 006090b commit 86c870d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions YamlDotNet.Test/Yaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public static string Text(string yamlText)
}

var indentation = indent.Groups[1].Length;
#pragma warning disable IDE0055 // Bug in Linux where IDE0055 is failing on the comments in the inline if statements
lines = lines
.Select((l, num) => l.Length == 0 ?
// Blank lines don't need to be indented.
Expand All @@ -116,6 +117,7 @@ public static string Text(string yamlText)
// However, other lines must be indented at least as much as the first line.
throw new ArgumentException($"Incorrectly indented line '{l}', #{num}.", nameof(yamlText)) :
l.Substring(indentation))
#pragma warning restore IDE0055
.ToList();
}

Expand Down
2 changes: 2 additions & 0 deletions YamlDotNet/Serialization/YamlSerializable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ public YamlSerializableAttribute()
/// Use this constructor if the attribute is placed on the <see cref="StaticContext"/>.
/// </summary>
/// <param name="serializableType">The type for which to include static code generation.</param>
#pragma warning disable IDE0055 // Bug in Linux where IDE0055 is failing on the pragma warning disable IDE0060
#pragma warning disable IDE0060
public YamlSerializableAttribute(Type serializableType)
#pragma warning restore IDE0060
#pragma warning restore IDE0055
{
}
}
Expand Down

0 comments on commit 86c870d

Please sign in to comment.