Skip to content

chore: enable TreatWarningsAsErrors and fix existing warnings - #151

Merged
andregoepel merged 1 commit into
mainfrom
feature/warnings-as-errors
Jul 26, 2026
Merged

chore: enable TreatWarningsAsErrors and fix existing warnings#151
andregoepel merged 1 commit into
mainfrom
feature/warnings-as-errors

Conversation

@andregoepel

Copy link
Copy Markdown
Owner

Summary

  • TreatWarningsAsErrors=true plus a WarningsNotAsErrors exception for low/moderate NuGet audit findings (NU1901/NU1902) in both the root and samples/Directory.Build.props (the samples props doesn't import the root — it's applied independently). High/critical findings (NU1903/NU1904) stay errors.
  • Fixed the 91 pre-existing warnings this surfaced: 88x CS8625 — test helpers building an NSubstitute proxy of UserManager<User>/SignInManager<User> passed bare null for unused non-nullable constructor parameters; followed the existing null! convention already used in AuthenticatedUserContext.cs rather than inventing a new pattern. 2x xUnit1051 and 1x CS8602 fixed the same way as the other repos in this rollout.

Test plan

  • dotnet build --no-incremental (full solution incl. samples) — 0 Warning(s), 0 Error(s)
  • dotnet testAndreGoepel.Marten.Identity.Tests 191/191, AndreGoepel.Marten.Identity.Blazor.Tests 130/130 passed
  • AndreGoepel.Marten.Identity.IntegrationTestsnot run, Docker daemon wasn't available in the dev environment this was built in. Needs a local run with Docker up before merging.
  • AndreGoepel.Marten.Identity.E2ETests — not run (own CI workflow), but compiles cleanly with 0 warnings as part of the full build
  • dotnet list package --vulnerable --include-transitive — no findings

Closes #150

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.

chore: enable TreatWarningsAsErrors for all projects

1 participant