.NET: Fix some more static analysis diagnostics (#1025)

* S1006

* S2219

* S3236

* S3260

* S1125

* IDE0063

* IDE0062

* IDE0028
This commit is contained in:
Stephen Toub
2025-09-30 22:50:22 +00:00
committed by GitHub
parent 77404d165c
commit 2539282d30
45 changed files with 69 additions and 74 deletions
@@ -21,7 +21,7 @@ public static class WorkflowVisualizer
/// <returns>A string representation of the workflow in DOT format.</returns>
public static string ToDotString(this Workflow workflow)
{
Throw.IfNull(workflow, nameof(workflow));
Throw.IfNull(workflow);
var lines = new List<string>
{
@@ -249,10 +249,7 @@ public static class WorkflowVisualizer
{
var sortedSources = sources.OrderBy(x => x, StringComparer.Ordinal).ToList();
var input = target + "|" + string.Join("|", sortedSources);
using (var sha256 = SHA256.Create())
{
return ComputeShortHash(input);
}
return ComputeShortHash(input);
}
private static string ComputeShortHash(string input)