Skip to content

Commit

Permalink
Enable IDE0071 (Simplify interpolation) (#70918)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jun 19, 2022
1 parent c230ba6 commit 656f909
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eng/CodeAnalysis.src.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ dotnet_diagnostic.IDE0066.severity = suggestion
dotnet_diagnostic.IDE0070.severity = suggestion

# IDE0071: Simplify interpolation
dotnet_diagnostic.IDE0071.severity = suggestion
dotnet_diagnostic.IDE0071.severity = warning

# IDE0072: Add missing cases
dotnet_diagnostic.IDE0072.severity = silent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public override string ToString()
typeName = "IDispatch";
}

return $"{RuntimeCallableWrapper.ToString()} ({typeName})";
return $"{RuntimeCallableWrapper} ({typeName})";
}

public ComTypeDesc ComTypeDesc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ public int Width
/// <summary>
/// Provides some interesting information about the PaperSize in String form.
/// </summary>
public override string ToString() => $"[PaperSize {PaperName} Kind={Kind.ToString()} Height={Height.ToString(CultureInfo.InvariantCulture)} Width={Width.ToString(CultureInfo.InvariantCulture)}]";
public override string ToString() => $"[PaperSize {PaperName} Kind={Kind} Height={Height.ToString(CultureInfo.InvariantCulture)} Width={Width.ToString(CultureInfo.InvariantCulture)}]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,6 @@ internal int GetMeasurableCharacterRangeCount()
/// <summary>
/// Converts this <see cref='StringFormat'/> to a human-readable string.
/// </summary>
public override string ToString() => $"[StringFormat, FormatFlags={FormatFlags.ToString()}]";
public override string ToString() => $"[StringFormat, FormatFlags={FormatFlags}]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ public ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool
{
if (NetEventSource.Log.IsEnabled())
{
Trace($"Connected with custom SslStream: alpn='${sslStream.NegotiatedApplicationProtocol.ToString()}'");
Trace($"Connected with custom SslStream: alpn='${sslStream.NegotiatedApplicationProtocol}'");
}
}
transportContext = sslStream.TransportContext;
Expand Down

0 comments on commit 656f909

Please sign in to comment.