Skip to content

refactor: anchor assembly-prefix exclusion at name boundaries#972

Merged
vbreuss merged 1 commit into
mainfrom
feat/anchor-assembly-prefix-boundaries
May 31, 2026
Merged

refactor: anchor assembly-prefix exclusion at name boundaries#972
vbreuss merged 1 commit into
mainfrom
feat/anchor-assembly-prefix-boundaries

Conversation

@vbreuss

@vbreuss vbreuss commented May 31, 2026

Copy link
Copy Markdown
Member

ExcludedAssemblyPrefixes were matched as raw substrings against Assembly.FullName with a culture-sensitive StartsWith, so e.g. System also excluded an unrelated assembly named Systemics, letting a first-party assembly be silently skipped during scanning.

Match against the simple assembly name (GetName().Name) using an ordinal, name-segment-boundary comparison (name == prefix || name.StartsWith(prefix + .)). Single-name entries like netstandard and DynamicProxyGenAssembly2 still match via the equality arm. Assemblies without a name are no longer scanned.

@vbreuss vbreuss self-assigned this May 31, 2026
@vbreuss vbreuss added the refactor A change or improvement without functional impact label May 31, 2026
@sonarqubecloud

Copy link
Copy Markdown

@vbreuss vbreuss enabled auto-merge (squash) May 31, 2026 06:16
@vbreuss vbreuss disabled auto-merge May 31, 2026 06:16
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

     23 files   - 27       23 suites   - 27   7m 43s ⏱️ -18s
 19 831 tests  - 18   19 830 ✅  - 18  1 💤 ±0  0 ❌ ±0 
102 518 runs   -  3  102 517 ✅  -  3  1 💤 ±0  0 ❌ ±0 

Results for commit c149539. ± Comparison against base commit e3547a2.

This pull request removes 3189 and adds 3171 tests. Note that renamed tests count towards both.
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "message35c5bcbe-93d1-4f53-b051-2abd32e88250")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "message4f250527-5d4f-45fa-9e78-ffc7ace77470")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messageaab64507-1808-4acc-875a-0aac4779e247")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messaged8d3ee16-696e-47d8-aa7e-e8273edbf47a")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messagee1808287-bd85-4f35-ae81-668e848c83e8")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messagefb09f6a9-5ea9-4d4e-971c-b7dfe7f465c3")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message73894a95-4501-4b61-aa04-74a6d68f7abd")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message78a7342c-526f-4eca-bce8-ff732903d731")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message8cf51dc7-73fc-4d60-97ec-9f009e7ff367")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message9cfd8372-f357-4246-897e-e4bc9b1c69b1")
…
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "message0ec9d2aa-1afe-4dea-8cdf-34f4d55e9d2a")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "message406ff5b0-2d8a-4243-9aec-d520d2023ac3")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messagead8986e7-6423-4ccf-8822-3b181a11b6ed")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messageb52fa209-79fb-4f19-a182-9bc3220a09f5")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messagec1c2f695-7736-42fd-879a-00bb70866a4f")
aweXpect.Core.Tests.Core.Exceptions.FailExceptionTests ‑ Message_ShouldBeSet(message: "messageed112d3a-eccf-4a62-88c3-47490fc511a1")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message04269b71-e5c3-4ead-8580-54e72ff57371")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message25fccf3b-e787-4a72-ac9f-4d61ddc64a78")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message3bf92b74-6ecf-4e6b-b4c0-2e18d33590ee")
aweXpect.Core.Tests.Core.Exceptions.SkipExceptionTests ‑ Message_ShouldBeSet(message: "message3e197037-3607-42d6-991a-f26ffc660160")
…

`ExcludedAssemblyPrefixes` were matched as raw substrings against `Assembly.FullName` with a culture-sensitive `StartsWith`, so e.g. `System` also excluded an unrelated assembly named `Systemics`, letting a first-party assembly be silently skipped during scanning.

Match against the simple assembly name (`GetName().Name`) using an ordinal, name-segment-boundary comparison (`name == prefix || name.StartsWith(prefix + .)`). Single-name entries like `netstandard` and `DynamicProxyGenAssembly2` still match via the equality arm. Assemblies without a name are no longer scanned.
@vbreuss vbreuss force-pushed the feat/anchor-assembly-prefix-boundaries branch from c149539 to 3f53798 Compare May 31, 2026 06:19
@vbreuss vbreuss merged commit 01e9240 into main May 31, 2026
5 of 9 checks passed
@vbreuss vbreuss deleted the feat/anchor-assembly-prefix-boundaries branch May 31, 2026 06:20
@github-actions

github-actions Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

🚀 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 8.0.27 (8.0.27, 8.0.2726.22922), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Bool_aweXpect 248.4 ns 2.87 ns 2.54 ns 0.0415 - 696 B
Bool_FluentAssertions 255.3 ns 1.24 ns 1.04 ns 0.0567 - 952 B
Equivalency_aweXpect 309,643.8 ns 1,560.26 ns 1,459.46 ns 20.0195 0.4883 335444 B
Equivalency_FluentAssertions 2,420,190.9 ns 30,375.21 ns 26,926.83 ns 289.0625 46.8750 4841647 B
Int_GreaterThan_aweXpect 259.7 ns 2.71 ns 2.54 ns 0.0515 - 864 B
Int_GreaterThan_FluentAssertions 250.7 ns 1.37 ns 1.22 ns 0.0730 - 1224 B
ItemsCount_AtLeast_aweXpect 502.9 ns 4.42 ns 3.69 ns 0.0811 - 1360 B
ItemsCount_AtLeast_FluentAssertions 488.9 ns 5.17 ns 4.83 ns 0.1192 - 2008 B
String_aweXpect 461.0 ns 5.13 ns 4.80 ns 0.0672 - 1128 B
String_FluentAssertions 1,237.7 ns 20.01 ns 18.71 ns 0.2346 - 3944 B
StringArray_aweXpect 1,932.2 ns 17.06 ns 15.96 ns 0.1564 - 2624 B
StringArray_FluentAssertions 1,344.1 ns 23.73 ns 22.19 ns 0.2480 - 4152 B
StringArrayInAnyOrder_aweXpect 2,491.3 ns 9.71 ns 8.11 ns 0.1678 - 2816 B
StringArrayInAnyOrder_FluentAssertions 20,475.7 ns 628.56 ns 587.96 ns 1.9836 0.0610 33471 B

@github-actions

github-actions Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

👽 Mutation Results

Mutation testing badge

aweXpect

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Total Detected Total Undetected Total Mutants

The final mutation score is NaN%

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

aweXpect.Core

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Total Detected Total Undetected Total Mutants
Core/Initialization/AweXpectInitialization.cs 77.27% 32 7 2 3 27 1 34 10 72

The final mutation score is 77.27%

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

github-actions Bot added a commit that referenced this pull request May 31, 2026
github-actions Bot added a commit that referenced this pull request May 31, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This is addressed in release v2.35.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor A change or improvement without functional impact state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant