Summary
Broaden the analyzer cleanup issue to match the work already completed on this branch, covering validated warning reductions across multiple test projects plus targeted production-code fixes in src/AppHost, src/Web, and related architecture surfaces. The cleanup remains code-fix first, with suppressions allowed only when they are narrow, justified, and documented.
Current Context
Recent branch work has moved beyond an initial cleanup slice and now includes validated analyzer and test-runtime fixes across:
tests/AppHost.Tests/*
tests/Web.Tests/*
tests/Web.Tests.Bunit/*
tests/Web.Tests.Integration/*
tests/Architecture.Tests/*
src/AppHost/AppHost.cs
src/AppHost/Properties/AssemblyInfo.cs
src/Web/Components/Theme/ThemeProvider.razor.cs
src/Web/Data/MongoDbBlogPostRepository.cs
src/Web/Data/MongoDbCategoryRepository.cs
src/Web/Infrastructure/FileStorage/LocalDiskFileStorage.cs
src/Web/Security/RoleClaimsHelper.cs
The warning families addressed on this branch include targeted fixes for analyzer findings such as CA2007, CA1515, CA1307, CA1063, CA1816, CA1711, CA2000, CA2201, and CA2012, depending on project and file context.
Local validation already completed for the committed branch work:
dotnet build MyBlog.slnx -c Release -v minimal passed
AppHost.Tests passed 60/60 with no skips
Web.Tests.Integration passed 36/36 with no warnings
Web.Tests passed 260/260
Web.Tests.Bunit passed 112/112
Goals
- Reduce the analyzer warning backlog with code changes that improve correctness, maintainability, or test reliability.
- Align the issue scope with the branch’s actual delivered work across test projects,
AppHost, targeted src/Web files, and small architecture-test adjustments.
- Preserve the existing standard that production code should not gain blanket warning suppression.
- Allow suppressions only when they are justified, narrowly scoped, and documented in code or PR rationale.
- Keep build and test validation green while warning cleanup progresses.
Acceptance Criteria
Notes
- Follow-on from issue
#400 and PR #401.
- Project board target: MyBlog project
#4.
- Sprint target:
Sprint 20: Mongo ObjectId Migration.
- This issue now tracks a broader validated cleanup pass rather than only a first incremental slice.
- Local-only workspace artifacts such as
.squad/* and .vscode/settings.json are not intended deliverables for the eventual PR.
Summary
Broaden the analyzer cleanup issue to match the work already completed on this branch, covering validated warning reductions across multiple test projects plus targeted production-code fixes in
src/AppHost,src/Web, and related architecture surfaces. The cleanup remains code-fix first, with suppressions allowed only when they are narrow, justified, and documented.Current Context
Recent branch work has moved beyond an initial cleanup slice and now includes validated analyzer and test-runtime fixes across:
tests/AppHost.Tests/*tests/Web.Tests/*tests/Web.Tests.Bunit/*tests/Web.Tests.Integration/*tests/Architecture.Tests/*src/AppHost/AppHost.cssrc/AppHost/Properties/AssemblyInfo.cssrc/Web/Components/Theme/ThemeProvider.razor.cssrc/Web/Data/MongoDbBlogPostRepository.cssrc/Web/Data/MongoDbCategoryRepository.cssrc/Web/Infrastructure/FileStorage/LocalDiskFileStorage.cssrc/Web/Security/RoleClaimsHelper.csThe warning families addressed on this branch include targeted fixes for analyzer findings such as
CA2007,CA1515,CA1307,CA1063,CA1816,CA1711,CA2000,CA2201, andCA2012, depending on project and file context.Local validation already completed for the committed branch work:
dotnet build MyBlog.slnx -c Release -v minimalpassedAppHost.Testspassed60/60with no skipsWeb.Tests.Integrationpassed36/36with no warningsWeb.Testspassed260/260Web.Tests.Bunitpassed112/112Goals
AppHost, targetedsrc/Webfiles, and small architecture-test adjustments.Acceptance Criteria
src/Webproduction files,src/AppHost, and architecture-related adjustments.Notes
#400and PR#401.#4.Sprint 20: Mongo ObjectId Migration..squad/*and.vscode/settings.jsonare not intended deliverables for the eventual PR.