Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Enable IDE0071 (Simplify interpolation)
  • Loading branch information
stephentoub committed Jun 17, 2022
commit 3aa1a90ce41b8c7db8add59a4c4a1bf73173b3d0
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