test(tests): warning-zero follow-on #710 — clear 3 xUnit analyzer warnings (5czj9v [2]) - #736
Merged
Merged
Conversation
…nings Follow-on to the #710 nullable-cleanup (plan complete, 8 PR #727-734 merged). Dispatch `5czj9v` [2] SECONDAIRE. Clears the 3 residual xUnit-analyzer warnings in Tests/ (the nullable family hit 0 in #710; these are the remaining non-CS analyzer warnings the build emits). Fixes (3 distinct warnings, all additive annotation or async — no logic change): - HarvestManagerExpectedImageCountTests.cs L56 (xUnit1012): `string rsstyle` → `string? rsstyle`. The Theory has `[InlineData(10, 3, null, 10)]` (L52) deliberately passing null rsstyle to pin the "null rsstyle = no grouping" branch of ComputeExpectedImageCount (mirrors CardPen). The null is INTENTIONAL test input; `string?` is the honest param type. - LocalizedFileNameContractTests.cs L30 (xUnit1012): `string fileName` → `string? fileName`. The Theory has `[InlineData(null)]` (L28) pinning the GetLocalizedFileName guard clause (null/empty returned as-is). Same intentional-null-test-input idiom. - OwlAdapterRegressionTests.cs L306+L319 (xUnit1031): `public void` → `public async Task` + `adapter.ToFileAsync(...).Wait()` → `await adapter.ToFileAsync(...)`. xUnit1031 flags blocking Task.Wait() in test methods; the fix is the canonical async/await. The method tests OWL2XML serialization to a temp file (no sync-context → no deadlock risk either way); async is the clean fix the analyzer asks for. Test name unchanged (ToFileAsync_...). DoD (measured on this branch, base master 9ed2e78): - dotnet build Tests.csproj --no-incremental: xUnit warnings 3→0. 0 errors. - dotnet test --filter (HarvestManagerExpected|LocalizedFileName|OwlAdapterRegression): 41/41 pass. - dotnet test (full): 587 pass / 1 fail (OWL #133 permanent) / 5 skip (#719). 0 regression. Residual (irréductible-infra, hors-scope Tests/ DoD): MSB3073 ×1 distinct on the MAIN project (Argumentum.AssetConverter.csproj, not Tests) — the Microsoft.XmlSerializer.Generator PackageReference (L25) sgen target exits code 1 at build. This is a main-project build-infra warning, not a Tests/ code warning; the DoD scope is "dotnet build Tests → 0 warning (ou irréductible documenté)". It appears in the Tests build log only via the Tests→main project dependency. Suppressing it would require touching the main csproj (out of scope for this tests-only lane; main project is zero-CS-warning stable per #587 and the SGEN package may be load-bearing for ExtendedXmlSerializer). Follow-up: separate main-project investigation to decide suppress (`<XmlSerializerGenerator...>` off) vs document as irréductible-infra. Base 9ed2e78. 0 Cards/ write, 0 rendering code change. Dispatch 5czj9v [2] SECONDAIRE. Base 9ed2e78. Co-authored-by: Claude-Code <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.
Tests/ warning-zero follow-on #710 — clear 3 xUnit analyzer warnings
Follow-on to the #710 nullable-cleanup (plan complete via 8 PR #727-#734 merged). Dispatch
5czj9v[2] SECONDAIRE. Clears the 3 residual xUnit-analyzer warnings inTests/(the nullable family hit 0 in #710; these are the remaining non-CS analyzer warnings).Fixes (3 distinct, all additive annotation or async — no logic change)
HarvestManagerExpectedImageCountTests.csstring rsstyle→string? rsstyle[InlineData(10,3,null,10)](L52) deliberately passing null rsstyle to pin the "null rsstyle = no grouping" branch ofComputeExpectedImageCount. Intentional null test inputLocalizedFileNameContractTests.csstring fileName→string? fileName[InlineData(null)](L28) pinning theGetLocalizedFileNameguard clause (null returned as-is). Same intentional-null idiomOwlAdapterRegressionTests.cspublic void→public async Task+.Wait()→awaitTask.Wait()in test methods; canonical fix is async/await. Tests OWL2XML serialization to temp file (no sync-context → no deadlock risk either way). Test name unchangedDoD (measured on this branch, base master
9ed2e789)dotnet buildTests.csproj --no-incremental: xUnit warnings 3→0. 0 errors.dotnet test --filter(HarvestManagerExpected|LocalizedFileName|OwlAdapterRegression): 41/41 pass.dotnet test(full): 587 pass / 1 fail (OWL feat(ontology): Publish OWL ontology to public endpoint #133 permanent) / 5 skip (docs(repo): test-skips inventory — 4 OAuth-gated legit + 1 Magick.NET deferred-bug (dispatch ynv05a idle) #719). 0 regression.Residual — irréductible-infra, hors-scope Tests/ DoD
MSB3073 ×1 distinct on the MAIN project (
Argumentum.AssetConverter.csproj, NOT Tests): theMicrosoft.XmlSerializer.GeneratorPackageReference (L25)sgentarget exits code 1 at build. This is a main-project build-infra warning, not a Tests/ code warning — it appears in the Tests build log only via the Tests→main project dependency.The DoD scope is "
dotnet buildTests → 0 warning (ou irréductible documenté)". Suppressing MSB3073 would require touching the main csproj:ExtendedXmlSerializer— disabling it blindly risks a runtime regression.<XmlSerializerGenerator...>off) vs document as irréductible-infra. Not bundled here.Non-goals
Cards/. 0 production / card-rendering code changed. Tests-only.Base
9ed2e789. Dispatch5czj9v[2] SECONDAIRE.🤖 Generated with Claude Code
Co-authored-by: Claude-Code noreply@anthropic.com