Skip to content

Commit 4477845

Browse files
committed
Suppress warnings where Format Document is incorrect
See dotnet/roslyn#31571
1 parent 5253326 commit 4477845

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonValue.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,9 @@ public static explicit operator int(JsonValue jsonValue)
604604
/// Throws System.InvalidCastException when the inner value type of the
605605
/// JsonValue is not the desired type of the conversion.
606606
/// </exception>
607+
#pragma warning disable IDE0055 // Fix formatting
607608
public static explicit operator int?(JsonValue jsonValue)
609+
#pragma warning restore IDE0055 // Fix formatting
608610
{
609611
if (jsonValue.IsNull)
610612
{
@@ -640,7 +642,9 @@ public static explicit operator bool(JsonValue jsonValue)
640642
/// Throws System.InvalidCastException when the inner value type of the
641643
/// JsonValue is not the desired type of the conversion.
642644
/// </exception>
645+
#pragma warning disable IDE0055 // Fix formatting
643646
public static explicit operator bool?(JsonValue jsonValue)
647+
#pragma warning restore IDE0055 // Fix formatting
644648
{
645649
if (jsonValue.IsNull)
646650
{
@@ -676,7 +680,9 @@ public static explicit operator double(JsonValue jsonValue)
676680
/// Throws System.InvalidCastException when the inner value type of the
677681
/// JsonValue is not the desired type of the conversion.
678682
/// </exception>
683+
#pragma warning disable IDE0055 // Fix formatting
679684
public static explicit operator double?(JsonValue jsonValue)
685+
#pragma warning restore IDE0055 // Fix formatting
680686
{
681687
if (jsonValue.IsNull)
682688
{
@@ -758,7 +764,9 @@ public static explicit operator DateTime(JsonValue jsonValue)
758764
/// Converts the given JsonValue into a nullable DateTime.
759765
/// </summary>
760766
/// <param name="jsonValue">The JsonValue to be converted.</param>
767+
#pragma warning disable IDE0055 // Fix formatting
761768
public static explicit operator DateTime?(JsonValue jsonValue)
769+
#pragma warning restore IDE0055 // Fix formatting
762770
{
763771
if (jsonValue.IsDateTime || jsonValue.IsNull)
764772
{

0 commit comments

Comments
 (0)