Is there a way to disable usages of compiler-generated code in Rider?

Hi, as the title says, is there a way to prevent Rider from showing usages of compiler-generated code? Seeing 16 usages when there are actually only 5 is misleading. The relevant usages are at the top, but the total number is inaccurate. It's not a big deal, but I couldn't find a solution, so I wanted to ask. I am using Unity ECS, which heavily relies on code generation.
 

0
3 comments

Hello, John Baracuda ,

In Rider 2024.1 and earlier, it the only way to discern real usages from generated code usages is by opening Find Usages results in a separate toolwindow using the button in the top right corner of the popup (see attached screenshot). 

However starting with Rider 2024.2 (EAP build already available), the Find Usages popup has been reworked and now allows in-place filtering of usages:

0

Hi Ivan,

Thanks for your response. I think reworking the find usage popup might be helpful, but my main concern is the usage count displayed over a type. This count usually gives me a quick understanding of how many other places depend on my type. The verbosity of the find usage popup is secondary for me, as I only encounter it when I explicitly search for usages.

If possible, I would like to request a feature to exclude compiler-generated usages from the count or display two separate numbers: one for user-defined usages and one for compiler-generated usages.

Thanks again.

0

Hi John Baracuda ,

Thanks for the clarification. I've submitted a new bug report to our issue tracker: RIDER-113916 Exclude generated code usages from code vision metric. Please upvote it to indicate your interest and follow the status updates.

Let me know if you have any further questions.

0

Please sign in to leave a comment.