Reference count for functions

Answered

Is there some setting for Rider to show the number of times a function is referenced above every function?

This is an absolute godsend to identify dead code.

7
6 comments

Is it a codelens functionality in VS?

Are you aware that deadcode (code, which is not referenced) is marked by gray text color? It is not absolutely the function that you are asking, but for deadcode it seem enough, right?

0

I noticed the gray part. I would like to see a ref count. This would allow me to to figure out how "hard" would it be to refactor certain bits of code.

VS Pro 2015 introduced this functionality as well as VS Code (I was not able to make it work on OS X). I do not know the exact name of the feature.

2

Would love to see this added. Mainly as the hyperlink makes it easy to click if you are already hovering over the function.

1

To Ivan's question, yes, it is the codelens feature everyone is after. It is pretty useful to have that information at a glance.

0

Hi everyone!

With Rider 2018.3 EAP 7 (https://www.jetbrains.com/rider/eap) and newer, Code Vision becomes visible in the editor.

We will blog about this in the coming weeks (https://blog.jetbrains.com/dotnet).

Note solution-wide analysis must be enabled for it to display all information.

Thanks all for your feedback and suggestions!

1

Please sign in to leave a comment.