Skip to content

Commit 485daaa

Browse files
authored
Merge pull request #978 from EdwardCooke/ec-fixlinuxwarnings
Fix warnings when building in linux due to IDE0055 bugs +semver:fix
2 parents 006090b + 86c870d commit 485daaa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

YamlDotNet.Test/Yaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public static string Text(string yamlText)
108108
}
109109

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

YamlDotNet/Serialization/YamlSerializable.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ public YamlSerializableAttribute()
4141
/// Use this constructor if the attribute is placed on the <see cref="StaticContext"/>.
4242
/// </summary>
4343
/// <param name="serializableType">The type for which to include static code generation.</param>
44+
#pragma warning disable IDE0055 // Bug in Linux where IDE0055 is failing on the pragma warning disable IDE0060
4445
#pragma warning disable IDE0060
4546
public YamlSerializableAttribute(Type serializableType)
4647
#pragma warning restore IDE0060
48+
#pragma warning restore IDE0055
4749
{
4850
}
4951
}

0 commit comments

Comments
 (0)