Skip to content

Restore C# partial-family unused detection - #4927

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue4834
Jul 27, 2026
Merged

Restore C# partial-family unused detection#4927
Widthdom merged 4 commits into
mainfrom
fix-issue4834

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Restore cross-file fallback usage detection for private members in C# partial types, including nested partial declarations.
  • Match sibling declarations by fully qualified logical type identity, semantic containing-type shape, and generic arity.
  • Restrict fallback evidence to the matched peer type's source range so unrelated same-file types cannot suppress genuine unused findings.
  • Add one shared three-file regression fixture across regular JSON, compact JSON, --by-bucket, and --actionable output.

Root cause

Nested type matching omitted qualified ancestor paths, while the fallback could also flatten distinct generic containing types and count identifier occurrences outside the matched peer declaration.

Validation

Documentation and changelog

Follow-up candidates

  • None.

Fixes #4834

@Widthdom
Widthdom marked this pull request as ready for review July 27, 2026 08:49
@Widthdom
Widthdom merged commit c35bbfb into main Jul 27, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4834 branch July 27, 2026 08:49
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.

Restore cross-file partial-class usage detection in unused analysis

1 participant