chore: remove redundant null-forgiving operators (S8969) + test-gate VSTHRD003 - #426
Merged
Merged
Conversation
…est-gate VSTHRD003 The SonarAnalyzer 10.32 bump (#416) added rule S8969 ("Null-forgiving operators should not be redundant"), which flagged 20 redundant `x!.member` uses across the test/contract-base code (e.g. `final!.ErrorItemCount`, `PeekStartedAt!.Value` — the `!` has no effect where the value is already non-null). Removed the redundant `!` at each site. Release (TWAE) build stays clean, which proves each was genuinely redundant (a needed `!` would surface a CS86xx nullable warning). Also suppressed one VSTHRD003 (await of a foreign task) in GatedSourceAsync — awaiting a TaskCompletionSource used to gate the test is intentional — with a narrow inline #pragma rather than a per-instance dismissal, so it survives line shifts. No behaviour or public-API change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
BenchmarkDotNet
Details
| Benchmark suite | Current: 2cce335 | Previous: 0e84394 | Ratio |
|---|---|---|---|
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_NoProgress(RecordCount: 1000) |
37609.28456624349 ns (± 111.36279810311107) |
32193.258728027344 ns (± 656.9553182984853) |
1.17 |
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_WithProgress(RecordCount: 1000) |
39753.53918457031 ns (± 893.7736619973967) |
35698.08504231771 ns (± 137.5391388325523) |
1.11 |
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_NoProgress(RecordCount: 100000) |
3816794.1588541665 ns (± 76020.21111761205) |
3162559.00390625 ns (± 4527.364080952584) |
1.21 |
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_WithProgress(RecordCount: 100000) |
3978123.3385416665 ns (± 15381.18525038182) |
3376237.1223958335 ns (± 8282.149531846426) |
1.18 |
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.FluentPipeline(RecordCount: 1000) |
33031.800201416016 ns (± 851.9279871863852) |
29751.945119222004 ns (± 155.089617437925) |
1.11 |
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.ManualComposition(RecordCount: 1000) |
38007.05818684896 ns (± 72.39351038259413) |
28961.55145263672 ns (± 120.576117905684) |
1.31 |
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.BaseClassComposition(RecordCount: 1000) |
92389.64839680989 ns (± 3277.6202265155694) |
81686.82682291667 ns (± 163.44912601062592) |
1.13 |
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.FluentPipeline(RecordCount: 100000) |
3163991.5794270835 ns (± 31902.29365365712) |
2875148.3125 ns (± 6159.261124918694) |
1.10 |
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.ManualComposition(RecordCount: 100000) |
3124178.734375 ns (± 6038.309558701502) |
2932113.671875 ns (± 10276.737699830326) |
1.07 |
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.BaseClassComposition(RecordCount: 100000) |
9784526.296875 ns (± 294581.27497472847) |
8228873.229166667 ns (± 16100.182434317143) |
1.19 |
This comment was automatically generated by workflow using github-action-benchmark.
This was referenced Aug 19, 2026
Merged
This was referenced Aug 21, 2026
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.
Clears the 21 InspectCode alerts the SonarAnalyzer 10.32 bump (#416) surfaced — all genuinely valid (not stale; a re-scan would re-find them).
Changes
!inx!.membersites across the test + shipped contract-base/test-double code (e.g.final!.ErrorItemCount,PeekStartedAt!.Value). Each!had no runtime effect.TaskCompletionSourcegate inGatedSourceAsyncis intentional; suppressed with a narrow inline#pragma warning disable/restore VSTHRD003(durable across line shifts, unlike a per-instance dismissal).Verification
!was truly redundant (a needed one would have produced a CS86xx nullable warning).Contributes to the code-scanning floor (InspectCode 21 → ~0 on the next main scan; the remaining Scorecard 11 are accepted by-design posture).
🤖 Generated with Claude Code