Skip to content

chore: clear InspectCode findings in mutation-test code (#361) - #411

Merged
Chris-Wolfgang merged 1 commit into
vNextfrom
chore/inspectcode-mutation-test-cleanup
Aug 18, 2026
Merged

Chris-Wolfgang merged 1 commit into
vNextfrom
chore/inspectcode-mutation-test-cleanup

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Clears the 16 fixable InspectCode findings that the #346 mutation-test additions introduced, following the .DotSettings documented policy (fix RedundantCast/S125 in code; dismiss AccessToModifiedClosure-class per instance).

Fixed in code

  • RedundantCast ×9 (OverloadDoubleCoverageTests) — dropped (IProgress<string>)null! casts; each overload set has a single one-arg progress method so null! resolves unambiguously. Release build + the 9 tests confirm the ArgumentNullException behavior is unchanged.
  • S3241 / UnusedMethodReturnValue.Local — CallCreateProgressTimer's IProgressTimer return is never consumed (all 3 call sites use it for its wiring side effect) → made void.
  • S125 ×5 — reworded descriptive / Stryker-directive comments to strip the code-like tokens (backticks, &&, ConfigureAwait(false), trailing ;) that trip the commented-out-code heuristic. No behavior change; the Stryker disable once Boolean directive stays functional.

Dismissed per instance (not in this PR — true FPs, handled on main)

AccessToModifiedClosure ×8, AccessToDisposedClosure ×1, VSTHRD003 ×1 — structural false positives on idiomatic test code (the reports++ counter-closure pattern; a test gate's TaskCompletionSource.Task).

Verification

  • Release build (TWAE) of both affected test projects: 0 errors (no CS0121 from the cast removal).
  • OverloadDoubleCoverageTests 9/9 pass, TestExtractorMutationTests 9/9 pass.

Contributes to #361 (drives InspectCode below its < 25/tool floor).

🤖 Generated with Claude Code

The #346 mutation-test additions introduced 16 fixable InspectCode
findings. Per the .DotSettings policy (fix RedundantCast/S125 in code;
dismiss AccessToModifiedClosure-class per instance):

- RedundantCast x9: drop the `(IProgress<string>)null!` casts in
  OverloadDoubleCoverageTests — each overload set has a single one-arg
  progress method, so `null!` resolves unambiguously (build + 9 tests
  confirm the ArgumentNullException behavior is unchanged).
- S3241 / UnusedMethodReturnValue.Local: CallCreateProgressTimer's
  return is never consumed (3 call sites use it for its wiring side
  effect) -> make it void.
- S125 x5: reword descriptive/Stryker-directive comments to drop the
  code-like tokens (backticks, &&, ConfigureAwait(false), trailing ;)
  that trip the "commented-out code" heuristic. No behavior change; the
  `Stryker disable once Boolean` directive stays functional.

The remaining AccessToModifiedClosure/AccessToDisposedClosure/VSTHRD003
findings are structural false positives on idiomatic test code
(counter closures, a test gate's TaskCompletionSource) and are
dismissed per instance per the documented policy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 00:51

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: 5085fad Previous: 5186db0 Ratio
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_NoProgress(RecordCount: 1000) 42607.38627115885 ns (± 128.10001496168064) 33511.38164265951 ns (± 121.16583148247912) 1.27
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_WithProgress(RecordCount: 1000) 45494.55625406901 ns (± 651.6730332892294) 35223.92938232422 ns (± 174.25090942486918) 1.29
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_NoProgress(RecordCount: 100000) 4160237.52734375 ns (± 9635.076278576207) 3226846.8424479165 ns (± 1713.7169739208118) 1.29
Wolfgang.Etl.Abstractions.Benchmarks.ExtractorBenchmarks.Extract_WithProgress(RecordCount: 100000) 4357572.447916667 ns (± 3669.366384003446) 3335411.8841145835 ns (± 2517.3013795519155) 1.31
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.FluentPipeline(RecordCount: 1000) 35336.43603515625 ns (± 64.35881335269141) 29808.294474283855 ns (± 131.02264257398073) 1.19
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.ManualComposition(RecordCount: 1000) 35232.92460123698 ns (± 109.06304579550297) 29762.065439860027 ns (± 99.2941933996938) 1.18
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.BaseClassComposition(RecordCount: 1000) 108070.10367838542 ns (± 189.08455989808232) 84486.51436360677 ns (± 336.75281547310556) 1.28
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.FluentPipeline(RecordCount: 100000) 3499987.103515625 ns (± 1725.706074531007) 2855788.0455729165 ns (± 2140.497536501959) 1.23
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.ManualComposition(RecordCount: 100000) 3529917.0247395835 ns (± 3627.8580784262995) 2959976.84765625 ns (± 8008.527434948032) 1.19
Wolfgang.Etl.Abstractions.Benchmarks.PipelineBenchmarks.BaseClassComposition(RecordCount: 100000) 10698748.317708334 ns (± 32979.374513827934) 9407115.291666666 ns (± 21711.610142582238) 1.14

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