ci: move from dotnet-format tool to .NET SDK command#4918
Draft
ci: move from dotnet-format tool to .NET SDK command#4918
Conversation
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Fixes 🐛
Dependencies ⬆️Deps
Other
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4918 +/- ##
==========================================
+ Coverage 73.88% 73.89% +0.01%
==========================================
Files 496 496
Lines 17951 17951
Branches 3516 3516
==========================================
+ Hits 13263 13265 +2
+ Misses 3826 3825 -1
+ Partials 862 861 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The exclusion was added as a workaround because dotnet-format was incorrectly deleting assertions in that file. This issue has since been resolved so the exclusion is no longer necessary. Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit bba983f.
This reverts commit bbcefcb.
Generate a dotnet format report via --report and upload it as a CI artifact so formatting issues can be inspected without re-running the job locally. Refs #4918 Co-Authored-By: Claude <noreply@anthropic.com>
Refs #4918 Co-Authored-By: Claude <noreply@anthropic.com>
Refs #4918 Co-Authored-By: Claude <noreply@anthropic.com>
Write a .gitignore into the report directory after uploading the artifact so the generated JSON report is not picked up as a git change by the subsequent commit step. Refs #4918 Co-Authored-By: Claude <noreply@anthropic.com>
Avoid unconditionally creating the report directory — only write the .gitignore when dotnet format actually produced the directory. Refs #4918 Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Remove
dotnet-formatglobal tool as it is now included in the .NET SDKRemarks
dotnet-format has been marked deprecated on NuGet.org.
It is included as a CLI command since the the .NET 6.0 SDK.
TODOs
dotnet tool install -g dotnet-formatfrom CI