Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable IDE0071 (Simplify interpolation) #70918

Merged
merged 1 commit into from
Jun 19, 2022
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
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