Upgrade to .NET 10 and add format + snitch self-check CI#9
Merged
Conversation
The `.gitattributes` already enforces `* text eol=lf`, so the `.editorconfig` `end_of_line = CRLF` was effectively contradictory and made `dotnet format --verify-no-changes` impossible to pass on the LF-checked-out tree. Aligning editorconfig to LF makes the format check reliable in CI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bumps the SDK and target frameworks to net10.0. Also updates Buildalyzer (5.0.1 -> 9.0.0) and the direct NuGet.* refs (6.0.0 -> 7.6.0) to clear the NU1903/NU1904 vulnerability errors that the Cake script's TreatAllWarningsAs(Error) was turning into build failures, and overrides the transitive System.Security.Cryptography.Xml to 10.0.8 for the same reason. The package bumps require small code adjustments: - AnalyzerResultExtensions: NuGetFrameworkFullComparer's ctor became private in NuGet 7; use the Instance singleton and guard the FrameworkReducer.GetNearest nullable return. - ProjectBuilder: AnalyzerManager.GetProject(string) was obsoleted in Buildalyzer 9 in favour of GetProject(IOPath); switch to IOPath.Parse and null-check the returned analyzer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds two new jobs to the PR workflow: - format: runs `dotnet format --verify-no-changes` against the solution so formatting drift fails the PR. - snitch: dogfoods snitch by running `dotnet run ... --strict` against its own solution so any transitive package conflict fails the PR. Also bumps `actions/setup-dotnet` to v4 for .NET 10 support. The previous "Normalize editorconfig to LF" commit is added to `.git-blame-ignore-revs` so blame on the touched files skips it. Co-Authored-By: Claude Opus 4.7 (1M context) <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
net10.0, updates Buildalyzer (5.0.1 → 9.0.0) and NuGet.* (6.0.0 → 7.6.0) to clear known vulnerability errors that the Cake script'sTreatAllWarningsAs(Error)was turning into build failures, and overrides the still-vulnerableSystem.Security.Cryptography.Xmltransitive to10.0.8. Includes small code adjustments for the new package APIs (IOPath.Parse,NuGetFrameworkFullComparer.Instance)..gitattributesalready enforces* text eol=lf, so the.editorconfigend_of_line = CRLFwas a latent contradiction that madedotnet format --verify-no-changesimpossible to pass on the LF-checked-out tree. This commit is added to.git-blame-ignore-revs.format— runsdotnet format --verify-no-changesso formatting drift fails the PR.snitch— dogfoods snitch with--strictagainst its own solution so any transitive package conflict fails the PR.}inruns-on: ubuntu-latest}on the existing build job (which was preventing the workflow from running at all) and bumpsactions/setup-dotnetto v4.Split into three commits — the LF normalization is isolated and ignored by
git blame.Test plan
dotnet cakebuilds the solution and runs tests on net10.0 (12/12 pass)dotnet format ./src/Snitch.sln --verify-no-changespassesdotnet run --project ./src/Snitch -- ./src/Snitch.sln --tfm net10.0 --strictreports "Everything looks good!"Build,Format,Snitch self-checkall green on the PR