Skip to content

chore: remove redundant null-forgiving operators (S8969) + test-gate VSTHRD003 - #426

Merged
Chris-Wolfgang merged 1 commit into
vNextfrom
chore/remove-redundant-null-forgiving
Aug 19, 2026
Merged

Chris-Wolfgang merged 1 commit into
vNextfrom
chore/remove-redundant-null-forgiving

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

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

  • S8969 ×20 — "Null-forgiving operators should not be redundant", a new rule in Sonar 10.32. Removed the redundant ! in x!.member sites across the test + shipped contract-base/test-double code (e.g. final!.ErrorItemCount, PeekStartedAt!.Value). Each ! had no runtime effect.
  • VSTHRD003 ×1 — awaiting a TaskCompletionSource gate in GatedSourceAsync is intentional; suppressed with a narrow inline #pragma warning disable/restore VSTHRD003 (durable across line shifts, unlike a per-instance dismissal).

Verification

  • Full-solution Release (TWAE) build: 0 warnings, 0 errors — which confirms every removed ! was truly redundant (a needed one would have produced a CS86xx nullable warning).
  • No behaviour or public-API change.

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

…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>
Copilot AI lite review requested due to automatic review settings August 19, 2026 01:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

2 participants