Skip to content

Upgrade to .NET 10 and add format + snitch self-check CI#9

Merged
Cellcote merged 3 commits into
masterfrom
t3code/edb77301
May 15, 2026
Merged

Upgrade to .NET 10 and add format + snitch self-check CI#9
Cellcote merged 3 commits into
masterfrom
t3code/edb77301

Conversation

@Cellcote
Copy link
Copy Markdown
Owner

Summary

  • Upgrade to .NET 10 — bumps SDK and target frameworks to 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's TreatAllWarningsAs(Error) was turning into build failures, and overrides the still-vulnerable System.Security.Cryptography.Xml transitive to 10.0.8. Includes small code adjustments for the new package APIs (IOPath.Parse, NuGetFrameworkFullComparer.Instance).
  • Normalize editorconfig to LF.gitattributes already enforces * text eol=lf, so the .editorconfig end_of_line = CRLF was a latent contradiction that made dotnet format --verify-no-changes impossible to pass on the LF-checked-out tree. This commit is added to .git-blame-ignore-revs.
  • Add two CI jobs to the PR workflow:
    • format — runs dotnet format --verify-no-changes so formatting drift fails the PR.
    • snitch — dogfoods snitch with --strict against its own solution so any transitive package conflict fails the PR.
  • Fixes a stray } in runs-on: ubuntu-latest} on the existing build job (which was preventing the workflow from running at all) and bumps actions/setup-dotnet to v4.

Split into three commits — the LF normalization is isolated and ignored by git blame.

Test plan

  • dotnet cake builds the solution and runs tests on net10.0 (12/12 pass)
  • dotnet format ./src/Snitch.sln --verify-no-changes passes
  • dotnet run --project ./src/Snitch -- ./src/Snitch.sln --tfm net10.0 --strict reports "Everything looks good!"
  • GitHub Actions: Build, Format, Snitch self-check all green on the PR

Cellcote and others added 3 commits May 15, 2026 20:37
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>
@Cellcote Cellcote merged commit 6049b66 into master May 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant