This repository was archived by the owner on Nov 10, 2026. It is now read-only.
Repository navigation
refactor: execute code cleanup - #219
Merged
Merged
Conversation
vbreuss
enabled auto-merge (squash)
May 30, 2026 17:08
vbreuss
force-pushed
the
topic/refactor-code
branch
from
May 30, 2026 17:18
22d89df to
21ca489
Compare
🚀 Benchmark ResultsDetails
|
👽 Mutation ResultsaweXpect.ReflectionDetails
The final mutation score is 88.72%Coverage Thresholds: high:80 low:60 break:0 |
|
|
This is addressed in release v1.4.0. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Summary
Runs ReSharper code cleanup across the solution, then fixes the compilation and test regressions the cleanup introduced in multi-targeted code. The cleanup itself is the intent of this PR; the remaining changes restore correctness where automated cleanup was too aggressive for a library that multi-targets
netstandard2.0,net8.0, andnet10.0.Code cleanup
SourceandTests.Compilation fixes
The cleanup analyzed the code against a single target framework (
netstandard2.0), where the#if NET8_0_OR_GREATERasync paths are inactive. That caused two categories of breakage onnet8.0/net10.0:usingdirectives (35 files).using System.Threading;/using System.Threading.Tasks;were removed as "unused" because the asyncoverloads that consume
Task<>/CancellationTokenare compiled out undernetstandard2.0. They are now wrapped in#if NET8_0_OR_GREATER … #endif, sothey exist only in the compilation context that uses them.
AddConstraint<…>(89 call sites). The cleanup strippedAddConstraint<IEnumerable<…>>(…)toAddConstraint(…). Undernet8.0+both the sync (IValueConstraint<T>) and async (IAsyncConstraint<T>) overloads exist, so without the explicit argument the calls became ambiguous (CS0121) or non-inferable (CS0411).Test fixes
ShouldChainSealedBeforeMethods— the cleanup removed thesealedkeyword from thesealed overridemembers of theSealedMemberClasstest fixture (redundant for the compiler, since the class is alreadysealed). Butsealed overrideemits the ILfinalflag while a plainoverridedoes not, soIsReallySealed()({ IsVirtual: true, IsFinal: true }) matched nothing and the filter returned empty. Restoredsealed override.Analyzer suppressions
Return/ReturnExactly/ReturnsExactlytest files. These tests intentionally exercise the non-genericTypeoverloads of the public API (mirroring the existing convention already used in the…OfTypetest files); converting them to the generic form would drop coverage of those overloads.Tooling
aweXpect.Reflection.sln.DotSettings— set the "Redundant type arguments of a method" inspection (RedundantTypeArgumentsOfMethod) toDO_NOT_SHOW, so future code cleanups no longer strip theAddConstraint<…>type arguments that are required undernet8.0+.