Skip to content

Conversation

@MitchRazga
Copy link
Contributor

Contributes to #383

I created a tool to identifty unreferenced members in a solution.
It found these and I removed them manually.

  • AttributeDataExtensions.GetNamespaces
  • IEventSymbolExtensions.GetNamespaces
  • IMethodSymbolExtensions.GetNamespaces
  • IPropertySymbolExtensions.GetNamespaces
  • ObjectExtensions.FormatValue
  • SyntaxNodeExtensions.HasUsing

I also removed their corresponding tests since they are no longer needed.

  • AttributeDataExtensionsTests.GetNamespaces
  • IEventSymbolGetNamespacesExtensionsTests
  • IMethodSymbolExtensionsGetNamespacesTests
  • ObjectExtensionsTests.FormatValue
  • ObjectExtensionsTests.FormatEnumValue
  • ObjectExtensionsTests.FormatEnumValueWhenValueIsIncorrect
  • ObjectExtensionsTests.FormatNullValue
  • ObjectExtensionsTests.FormatCollectionValue

All tests passed.
Rocks.CodeGenerationTest Generator testing complete.

	Total assembly count is 121
	Total discovered type count is 18051

@MitchRazga
Copy link
Contributor Author

There may be more. Will scan again once #394 is finished.

@JasonBock
Copy link
Owner

I was just about to say, let's keep this PR open until #394 is done :)

@JasonBock
Copy link
Owner

Hey @MitchRazga, #394 is now committed, do you think you'll be able to resolve merge conflict and maybe find any other sources of dead code before I release 10.0.0? I don't have an exact date for this, but I'm guessing it'll be sometime near the end of November.

@MitchRazga
Copy link
Contributor Author

Hey @MitchRazga, #394 is now committed, do you think you'll be able to resolve merge conflict and maybe find any other sources of dead code before I release 10.0.0? I don't have an exact date for this, but I'm guessing it'll be sometime near the end of November.

I'll rebase on main and re-run the tool tomorrow 😄

@MitchRazga MitchRazga force-pushed the 383-Remove-Dead-Code branch from 150d705 to 93fb9b8 Compare November 9, 2025 01:03
@MitchRazga
Copy link
Contributor Author

MitchRazga commented Nov 9, 2025

Done.
Didn't find anything else on the rerun. There are a few minor ones like:
Rocks.Analysis.Models.EquatableArray.AsEquatableArray<T>(System.Collections.Immutable.ImmutableArray<T>)
Rocks.Analysis.Models.EquatableArray<T>.ToArray()
but have left those in since that class gets copy-pasted occassionally.

1345 Tests Passed.
Generator testing complete.

Total assembly count is 122
Total discovered type count is 20775

@JasonBock
Copy link
Owner

LGTM @MitchRazga!

@JasonBock JasonBock merged commit 6dac674 into JasonBock:main Nov 9, 2025
@MitchRazga MitchRazga deleted the 383-Remove-Dead-Code branch November 9, 2025 18:53
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.

2 participants