Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

refactor: apply ReSharper code cleanup - #315

Merged
vbreuss merged 6 commits into
mainfrom
chore/resharper-cleanup
Jun 4, 2026
Merged

vbreuss merged 6 commits into
mainfrom
chore/resharper-cleanup

Conversation

@vbreuss

@vbreuss vbreuss commented Jun 4, 2026

Copy link
Copy Markdown
Member

No description provided.

@vbreuss vbreuss self-assigned this Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Test Results

0 files   -     13  0 suites   - 13   0s ⏱️ - 9m 41s
0 tests  -  6 085  0 ✅  -  6 082  0 💤  -  3  0 ❌ ±0 
0 runs   - 36 355  0 ✅  - 36 342  0 💤  - 13  0 ❌ ±0 

Results for commit f9bbc97. ± Comparison against base commit 4974e3a.

♻️ This comment has been updated with latest results.

The cleanup deleted 'using System.Threading;' and
'using System.Threading.Tasks;' from ThatConstructors.AreStatic.cs,
but the file uses CancellationToken and Task<ConstraintResult> in its
IsMetBy implementations, breaking the build on net8.0 and net10.0.
@vbreuss
vbreuss force-pushed the chore/resharper-cleanup branch from d4aece6 to f9bbc97 Compare June 4, 2026 14:54
@vbreuss
vbreuss enabled auto-merge (squash) June 4, 2026 14:55
@github-actions

github-actions Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
AMD EPYC 9V74 2.60GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.300
[Host] : .NET 10.0.8 (10.0.8, 10.0.826.23019), X64 RyuJIT x86-64-v3
DefaultJob : .NET 10.0.8 (10.0.8, 10.0.826.23019), X64 RyuJIT x86-64-v3

Method Mean Error StdDev Gen0 Allocated
TypeIsNotStatic_aweXpect 212.1 ns 1.44 ns 1.28 ns 0.0386 648 B

vbreuss added 4 commits June 4, 2026 17:05
The cleanup broke the Release build (multi-TFM, TreatWarningsAsErrors):

- ThatConstructors.AreStatic.cs: restore System.Threading[.Tasks]
  usings (guarded by #if NET8_0_OR_GREATER to match the guarded
  CancellationToken/Task usage and stay unused-free on netstandard2.0).
- LinqAsyncHelpersTests.cs: revert extension-method syntax back to
  explicit LinqAsyncHelpers.Where/Distinct calls; on net10.0 the BCL
  System.Linq.AsyncEnumerable overloads made the calls ambiguous (CS0121).
- ThatProperty.IsAnExtensionProperty.Tests.cs: restore the
  TestHelpers and Xunit.Sdk usings consumed only inside
  #if NET10_0_OR_GREATER (GetExtensionProperty, XunitException).
ReSharper removed 'sealed' from the override members of the (sealed)
SealedMemberClass, judging it redundant. For a reflection library it is
not: MethodInfo.IsFinal is only true for 'sealed override' methods, and
ShouldChainSealedBeforeMethods filters .Sealed.Methods() on IsFinal.
Without the keyword the filtered set was empty and the test failed on
net8.0, net10.0 and net48.
Add a comment and ReSharper suppression so a future code cleanup does
not re-remove the 'sealed' keyword that ShouldChainSealedBeforeMethods
depends on (MethodInfo.IsFinal).
Disable the ReSharper 'redundant sealed keyword' inspection solution-wide
via .sln.DotSettings (matching the existing RedundantTypeArgumentsOfMethod
suppression), so code cleanup will not strip the load-bearing 'sealed' on
SealedMemberClass. Drop the now-redundant inline ReSharper disable/restore
directives, keeping the explanatory comment.
@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@vbreuss
vbreuss disabled auto-merge June 4, 2026 15:25
@vbreuss
vbreuss merged commit c5e2dc0 into main Jun 4, 2026
9 checks passed
@vbreuss
vbreuss deleted the chore/resharper-cleanup branch June 4, 2026 15:25
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

👽 Mutation Results

Mutation testing badge

aweXpect.Reflection

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Total Detected Total Undetected Total Mutants
Filters/TypeFilters.WithinNamespace.cs 100.00% 3 0 0 0 0 0 3 0 3
Helpers/MemberInfoHelpers.cs 94.44% 17 1 0 0 1 1 17 1 20
Helpers/ParameterModifierHelpers.cs 100.00% 1 0 0 0 1 0 1 0 2
Helpers/TypeHelpers.cs 96.92% 282 7 1 2 88 14 283 9 394
Options/ParameterFilterOptions.cs 83.33% 20 3 0 1 10 4 20 4 38
ThatAssemblies.AreStrongNamed.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatAssemblies.DoNotHave.cs 100.00% 18 0 0 0 6 6 18 0 30
ThatAssemblies.Have.cs 100.00% 20 0 0 0 8 6 20 0 34
ThatAssembly.DoesNotHave.cs 100.00% 1 0 0 0 1 0 1 0 2
ThatConstructor.DoesNotHave.cs 100.00% 2 0 0 0 1 0 2 0 3
ThatConstructor.Has.cs 100.00% 12 0 0 0 5 4 12 0 21
ThatConstructor.HasParameter.cs 97.87% 46 0 0 1 12 20 46 1 79
ThatConstructors.AreStatic.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatConstructors.DoNotHave.cs 100.00% 20 0 0 0 6 6 20 0 32
ThatConstructors.Have.cs 100.00% 24 0 0 0 8 6 24 0 38
ThatConstructors.HaveInParameter.cs 100.00% 32 0 0 0 2 6 32 0 40
ThatConstructors.HaveOptionalParameter.cs 96.88% 31 1 0 0 2 6 31 1 40
ThatConstructors.HaveOutParameter.cs 100.00% 32 0 0 0 2 6 32 0 40
ThatConstructors.HaveParameter.cs 96.43% 54 0 0 2 18 18 54 2 92
ThatConstructors.HaveParameterCount.cs 100.00% 13 0 0 0 2 10 13 0 25
ThatConstructors.HaveParamsParameter.cs 96.88% 31 1 0 0 2 6 31 1 40
ThatConstructors.HaveRefParameter.cs 100.00% 32 0 0 0 2 6 32 0 40
ThatEvent.DoesNotHave.cs 100.00% 1 0 0 0 1 0 1 0 2
ThatEvents.AreAbstract.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatEvents.AreOfType.cs 90.00% 18 2 0 0 7 6 18 2 33
ThatEvents.AreSealed.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatEvents.AreStatic.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatEvents.DoNotHave.cs 100.00% 18 0 0 0 6 6 18 0 30
ThatEvents.Have.cs 100.00% 20 0 0 0 8 6 20 0 34
ThatField.DoesNotHave.cs 100.00% 2 0 0 0 1 0 2 0 3
ThatField.Has.cs 100.00% 12 0 0 0 5 4 12 0 21
ThatFields.AreConstant.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatFields.AreOfType.cs 90.00% 18 2 0 0 7 6 18 2 33
ThatFields.AreReadOnly.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatFields.AreStatic.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatFields.DoNotHave.cs 100.00% 20 0 0 0 6 6 20 0 32
ThatFields.Have.cs 100.00% 24 0 0 0 8 6 24 0 38
ThatMembers.AreInternal.cs 100.00% 14 0 0 0 2 10 14 0 26
ThatMembers.AreObsolete.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatMembers.ArePrivate.cs 100.00% 14 0 0 0 2 10 14 0 26
ThatMembers.ArePrivateProtected.cs 100.00% 14 0 0 0 2 10 14 0 26
ThatMembers.AreProtected.cs 100.00% 14 0 0 0 2 10 14 0 26
ThatMembers.AreProtectedInternal.cs 100.00% 14 0 0 0 2 10 14 0 26
ThatMembers.ArePublic.cs 100.00% 14 0 0 0 2 10 14 0 26
ThatMethod.DoesNotHave.cs 100.00% 1 0 0 0 1 0 1 0 2
ThatMethod.HasParameter.cs 97.87% 46 0 0 1 12 20 46 1 79
ThatMethods.AreAbstract.cs 83.33% 20 0 0 4 4 12 20 4 40
ThatMethods.AreAsync.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatMethods.AreExtensionMethods.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatMethods.AreOperators.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatMethods.AreSealed.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatMethods.AreStatic.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatMethods.AreVirtual.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatMethods.DoNotHave.cs 100.00% 18 0 0 0 6 6 18 0 30
ThatMethods.Have.cs 100.00% 20 0 0 0 8 6 20 0 34
ThatMethods.HaveInParameter.cs 71.88% 23 3 0 6 2 6 23 9 40
ThatMethods.HaveOptionalParameter.cs 71.88% 23 3 0 6 2 6 23 9 40
ThatMethods.HaveOutParameter.cs 71.88% 23 3 0 6 2 6 23 9 40
ThatMethods.HaveParameter.cs 91.07% 51 0 0 5 18 18 51 5 92
ThatMethods.HaveParameterCount.cs 100.00% 13 0 0 0 2 10 13 0 25
ThatMethods.HaveParamsParameter.cs 71.88% 23 3 0 6 2 6 23 9 40
ThatMethods.HaveRefParameter.cs 71.88% 23 3 0 6 2 6 23 9 40
ThatMethods.Override.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatMethods.Return.cs 100.00% 20 0 0 0 7 6 20 0 33
ThatProperties.AreAbstract.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.AreExtensionProperties.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.AreIndexers.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.AreOfType.cs 90.00% 18 2 0 0 7 6 18 2 33
ThatProperties.AreReadable.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.AreReadOnly.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.AreReadWrite.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.AreRequired.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.AreSealed.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.AreStatic.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.AreVirtual.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperties.AreWritable.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.AreWriteOnly.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.DoNotHave.cs 100.00% 18 0 0 0 6 6 18 0 30
ThatProperties.Have.cs 100.00% 19 0 1 0 8 6 20 0 34
ThatProperties.HaveAGetter.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.HaveAnInitSetter.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.HaveASetter.cs 100.00% 8 0 0 0 2 6 8 0 16
ThatProperties.Override.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatProperty.DoesNotHave.cs 100.00% 1 0 0 0 1 0 1 0 2
ThatType.Implements.cs 100.00% 40 0 0 0 9 9 40 0 58
ThatType.InheritsFrom.cs 100.00% 39 0 0 0 11 11 39 0 61
ThatType.IsAssignableTo.cs 100.00% 42 0 0 0 16 12 42 0 70
ThatTypes.AreAbstract.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreAssignableTo.cs 85.53% 65 11 0 0 24 24 65 11 124
ThatTypes.AreAttributes.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreClasses.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreDelegates.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreEnums.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatTypes.AreExceptions.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreInstantiable.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreInterfaces.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatTypes.AreNested.cs 100.00% 24 0 0 0 4 12 24 0 40
ThatTypes.AreReadOnly.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreRecords.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreRecordStructs.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreRefStructs.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreSealed.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreStatic.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreStructs.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.AreWithinNamespace.cs 66.67% 12 6 0 0 4 16 12 6 38
ThatTypes.DoNotHave.cs 100.00% 18 0 0 0 6 6 18 0 30
ThatTypes.Have.cs 100.00% 20 0 0 0 8 6 20 0 34
ThatTypes.HaveADefaultConstructor.cs 100.00% 18 0 0 0 4 12 18 0 34
ThatTypes.Implement.cs 75.00% 54 12 0 6 12 16 54 18 100
ThatTypes.InheritFrom.cs 93.94% 62 4 0 0 16 20 62 4 102

The final mutation score is 95.42%

Coverage Thresholds: high:80 low:60 break:0

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

This is addressed in release v2.0.0.

@github-actions github-actions Bot added the state: released The issue is released label Jun 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant