style: apply CSharpier formatting to all C# sources

Repo-wide sweep with the pinned CSharpier 1.3.0 tool. Whitespace and
line-wrapping only; OpenNest.Engine.Tests (109) and OpenNest.IO.Tests
pass after reformat, full solution builds 0 errors.

Added .csharpierignore so csproj/config XML keeps its existing layout
(CSharpier's XML wrapping churns attributes with zero benefit).

Formatting is now enforceable: dotnet csharpier check . passes.
This commit is contained in:
aj
2026-09-20 16:41:50 -04:00
parent 8e6fa677fb
commit aec0523062
476 changed files with 16592 additions and 7800 deletions
@@ -58,9 +58,11 @@ public class BestFitOverlapTests
if (parts[0].Intersects(parts[1], out var pts))
{
overlapping++;
_output.WriteLine($" OVERLAP #{overlapping}: Test {result.Candidate.TestNumber} " +
$"Part2Rot={OpenNest.Math.Angle.ToDegrees(result.Candidate.Part2Rotation):F1}° " +
$"collision pts={pts.Count}");
_output.WriteLine(
$" OVERLAP #{overlapping}: Test {result.Candidate.TestNumber} "
+ $"Part2Rot={OpenNest.Math.Angle.ToDegrees(result.Candidate.Part2Rotation):F1}° "
+ $"collision pts={pts.Count}"
);
}
}
@@ -16,8 +16,10 @@ public class BestFitResultFrameTests
var result = EvaluateOffsetPair(canonical, new Vector(40, 30));
Assert.True(IsNonAxisAligned(result.OptimalRotation),
$"Expected a non-axis-aligned result, got {Angle.ToDegrees(result.OptimalRotation):F2} degrees.");
Assert.True(
IsNonAxisAligned(result.OptimalRotation),
$"Expected a non-axis-aligned result, got {Angle.ToDegrees(result.OptimalRotation):F2} degrees."
);
var parts = result.BuildCanonicalParts();
var bounds = result.GetCutBounds(parts);
@@ -55,7 +57,7 @@ public class BestFitResultFrameTests
Part1Rotation = 0,
Part2Rotation = System.Math.PI,
Part2Offset = offset,
Spacing = 0.25
Spacing = 0.25,
};
return new PairEvaluator().Evaluate(candidate);
@@ -38,9 +38,7 @@ public class NfpBestFitIntegrationTests
var drawing = TestHelpers.MakeLShapeDrawing();
var results = finder.FindBestFits(drawing);
var bestUtilization = results
.Where(r => r.Keep)
.Max(r => r.Utilization);
var bestUtilization = results.Where(r => r.Keep).Max(r => r.Utilization);
Assert.True(bestUtilization > 0.5);
}
@@ -51,7 +49,6 @@ public class NfpBestFitIntegrationTests
var drawing = TestHelpers.MakeSquareDrawing();
var results = finder.FindBestFits(drawing);
Assert.All(results.Where(r => r.Keep), r =>
Assert.Equal("Valid", r.Reason));
Assert.All(results.Where(r => r.Keep), r => Assert.Equal("Valid", r.Reason));
}
}
@@ -119,6 +119,9 @@ public class NfpSlideStrategyTests
validCount++;
}
Assert.True(validCount > 0, $"No non-overlapping candidates found out of {candidates.Count} total. Candidate 0 offset: {candidates[0].Part2Offset}");
Assert.True(
validCount > 0,
$"No non-overlapping candidates found out of {candidates.Count} total. Candidate 0 offset: {candidates[0].Part2Offset}"
);
}
}