Add CSharpier formatting via CSharpier.MSBuild#33
Merged
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/152afadd-e6d8-4231-8953-3da3177ebf05 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/4d77b345-35e6-48e5-9bff-5e0b0584dfa2 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Tyrrrz
April 15, 2026 09:38
View session
Owner
|
@copilot let's actually move each package refence to each csproj |
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/fc894286-1b0f-4fd7-850e-bbc8958b69f0 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Integrates CSharpier into the build via CSharpier.MsBuild to enforce consistent C# formatting across the solution.
Changes:
- Add centralized package version pin for
CSharpier.MsBuildand reference it solution-wide viaDirectory.Build.props. - Apply CSharpier-driven formatting updates across library and test source files (primarily whitespace, wrapping, and
usingordering).
Reviewed changes
Copilot reviewed 46 out of 47 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Pins CSharpier.MsBuild version via central package management. |
| Directory.Build.props | Adds solution-wide PackageReference to CSharpier.MsBuild with PrivateAssets="all". |
| PowerKit/TempFile.cs | Formatting only (wrapping long call; using ordering). |
| PowerKit/TempDirectory.cs | using ordering formatting. |
| PowerKit/LockFile.cs | using ordering formatting. |
| PowerKit/Extensions/TimeSpanExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/TextReaderExtensions.cs | using ordering + formatting of while condition. |
| PowerKit/Extensions/StringExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/StringBuilderExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/StreamExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/PathExtensions.cs | Formatting only (array layout, wrapping long expressions). |
| PowerKit/Extensions/LongExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/IntExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/FileExtensions.cs | using ordering + wrapping FileStream ctor args. |
| PowerKit/Extensions/ExceptionExtensions.cs | Removes trailing whitespace line. |
| PowerKit/Extensions/EnvironmentExtensions.cs | Wraps long Environment.* calls for formatting consistency. |
| PowerKit/Extensions/EnumerableExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/EncodingExtensions.cs | Formatting only (wrap long method signatures/ternary). |
| PowerKit/Extensions/DoubleExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/DirectoryExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/DecimalExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/DateTimeOffsetExtensions.cs | Formatting only (expression-bodied method wrapping). |
| PowerKit/Extensions/DateTimeExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/CultureInfoExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/ConsoleExtensions.cs | Wraps method parameters for formatting consistency. |
| PowerKit/Extensions/ComparableExtensions.cs | Formatting only (generic constraint wrapping). |
| PowerKit/Extensions/CollectionExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/BinaryWriterExtensions.cs | using ordering formatting. |
| PowerKit/Extensions/BinaryReaderExtensions.cs | using ordering + formatting of conditional expression property. |
| PowerKit/Extensions/AsyncEnumerableExtensions.cs | Formatting only (wrap while / await foreach lines). |
| PowerKit/Extensions/AssemblyExtensions.cs | Formatting only (wrap null-coalescing chain). |
| PowerKit/Extensions/ArrayPoolExtensions.cs | using ordering formatting. |
| PowerKit.Tests/StringBuilderExtensionsTests.cs | Formatting only (method chaining wrapping). |
| PowerKit.Tests/StreamExtensionsTests.cs | Removes trailing whitespace line. |
| PowerKit.Tests/ProcessExtensionsTests.cs | Formatting only (wrap Process.Start args). |
| PowerKit.Tests/PowerKit.Tests.csproj | Removes stray blank lines / whitespace formatting. |
| PowerKit.Tests/GuidExtensionsTests.cs | Formatting only (method chaining wrapping). |
| PowerKit.Tests/FileExtensionsTests.cs | Formatting only (wrap long File.SetAttributes calls). |
| PowerKit.Tests/EnumerableExtensionsTests.cs | Formatting only (wrap assertions / chaining). |
| PowerKit.Tests/DirectoryExtensionsTests.cs | Formatting only (wrap long call). |
| PowerKit.Tests/DateTimeOffsetExtensionsTests.cs | Formatting only (wrap chaining). |
| PowerKit.Tests/CultureInfoExtensionsTests.cs | Formatting only (wrap chaining / line breaks). |
| PowerKit.Tests/CollectionExtensionsTests.cs | Formatting only (cast spacing). |
| PowerKit.Tests/BinaryReaderExtensionsTests.cs | Removes trailing whitespace line. |
| PowerKit.Tests/AsyncEnumerableExtensionsTests.cs | Formatting only (wrap assertions). |
| PowerKit.Tests/AssemblyExtensionsTests.cs | Formatting only (wrap assertion chaining). |
| PowerKit.Tests/AggregateExceptionExtensionsTests.cs | Formatting only (wrap chaining / ctor nesting). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates CSharpier into the solution for consistent code formatting, using the MSBuild package so formatting runs automatically as part of the build rather than requiring a separate tool invocation.
Changes
Directory.Packages.props— pinsCSharpier.MsBuild1.2.6PowerKit/PowerKit.csproj— referencesCSharpier.MsBuildwithPrivateAssets="all"PowerKit.Tests/PowerKit.Tests.csproj— referencesCSharpier.MsBuildwithPrivateAssets="all".config/dotnet-tools.json— removed; the MSBuild package supersedes the local tool manifestPowerKit/andPowerKit.Tests/(45 files) to match CSharpier's style