Suggestion for 6.1

Summary: add function exit point visualisation.

Today I've stumbled upon a method that is several hundred lines long. Its return type is 'bool'. Unfortunately it was renamed by some dev what changed its meaning - think WasReplyOK() renamed to WereThereErrors(). The dev then tried to invert all return statements from 'return false' to 'return true' and vice versa to reflect that change, but forgot about some, what introduced mess. For such refactorings it would be helpful to have a way to visualize (like different background or something) or enumerate all function exit points. I think Resharper already has the knowledge, it's just a matter of showing it :)

Thank you.

2 comments
Comment actions Permalink

Hello
     In order to highlight all function exits just place the caret on a 'return' keyword and invoke Highlight Usages feature. You can also use Find Usages to show all exits in a separate Find Results tool window. Let me know if this helps. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Thanks Andrey, I didn't know that. It's more than helpful. It finds not only returns but also exception points.

0

Please sign in to leave a comment.