Skip to content

Fix C# Regex alias search and unused contract annotations - #3654

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue3391-3396
Jun 15, 2026
Merged

Fix C# Regex alias search and unused contract annotations#3654
Widthdom merged 2 commits into
mainfrom
fix-issue3391-3396

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Resolve C# using-alias constructor references so references BoundedRegex --kind instantiate distinguishes BoundedRegex aliases from direct BCL Regex construction.
  • Add bcl_regex_without_timeout reference reporting for direct BCL Regex construction without a timeout argument.
  • Classify serialization/reflection contract annotations on public C# properties, fields, constructors, and methods as reflection_or_config_suspect in unused-symbol analysis.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --configuration Release --framework net9.0 --filter "FullyQualifiedName~ConsoleUiTests.PrintUsage_WithoutBanner_HidesAsciiArtAndEasterEggFlags"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~ReferenceExtractorTests|FullyQualifiedName~DbReaderTests.GetUnusedSymbols_SerializationAndReflectionContractAttributes_AreClassifiedAsSuspect|FullyQualifiedName~DatabaseTests.InsertReferences_ExistingReferenceKinds_AreAccepted"
  • dotnet build
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check origin/main..HEAD
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll index . --json
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Codex adversarial review: No blocking/actionable issues found.

Fixes #3391
Fixes #3396

@Widthdom
Widthdom force-pushed the fix-issue3391-3396 branch from dfaa49c to 03a14f8 Compare June 15, 2026 02:39
@Widthdom
Widthdom marked this pull request as ready for review June 15, 2026 03:51
@Widthdom
Widthdom merged commit 153b961 into main Jun 15, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3391-3396 branch June 15, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant