matkoch / resharper-cognitivecomplexity

https://plugins.jetbrains.com/plugin/12024-cognitivecomplexity
MIT License
200 stars 7 forks source link

Show complexity in tooltip even when threshold is not exceeded #6

Closed aboy021 closed 4 years ago

aboy021 commented 5 years ago

It would be great if the complexity of a method could be viewed by looking at its tooltip in Visual Studio. This is the approach used by the cyclomatic complexity plugin.

kstreichergb commented 5 years ago

Doesn't it do that already? image

BradKnowles commented 4 years ago

I'm also not seeing the information in the tooltip. I'm running Visual Studio 2019 Professional 16.3.9 and ReSharper Ultimate 2019.2.3

Here is my method showing a tooltip (I also have the Cyclomatic Complexity Plugin)

image

My settings image

matkoch commented 4 years ago

It doesn't really make sense to have both installed. Can you try again with CyclomaticComplexity plugin uninstalled?

matkoch commented 4 years ago

BTW, the tooltip is only shown when the threshold is exceeded. I don't really see a point in displaying it otherwise.

BradKnowles commented 4 years ago

Makes sense on both accounts, I already had the Cyclomatic Complexity plugin installed when I decided to try it out. It's been uninstalled.

Based on the settings in the previous screen shot, the tooltip should appear if the complexity exceeds 8% and should say "Simple Enough" between 8 and 79%?

I'm still not seeing it appear in the tooltip. Is my test method not complex enough?

image

matkoch commented 4 years ago

Sorry I wasn’t clear enough. The tooltip/inspection appears when the language threshold is exceeded. Here it’s 8, but not 8% but 8 as a scalar value.

aboy021 commented 4 years ago

Thanks for clearing that up. I can confirm that it works as you've described for me.

Turns out what I'd really like is the option to always show the measured complexity in the tooltip. Thank you.

matkoch commented 4 years ago

I think last time I tried I had some issues, but I will look at it again.

On Mon 25. Nov 2019 at 02:28, Arthur Boyer notifications@github.com wrote:

Thanks for clearing that up. I can confirm that it works as you've described for me.

Turns out what I'd really like is the option to always show the measured complexity in the tooltip. Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/matkoch/resharper-cognitivecomplexity/issues/6?email_source=notifications&email_token=ABGGB7WQFV6TZ5NBG5W6UOLQVMLZBA5CNFSM4IOQRJ5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAZJBI#issuecomment-557945989, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGGB7TAUBZZAFBGQGREJXLQVMLZBANCNFSM4IOQRJ5A .

aboy021 commented 4 years ago

Awesome. In either case it's a wonderful extension.

programuotojasgf commented 4 years ago

doesn't show anything on Visual studio for me, even with every setting set to 0.

matkoch commented 4 years ago

Not sure what you mean. In visual studio there’s only one setting available.

On Mon 25. Nov 2019 at 13:52, programuotojasgf notifications@github.com wrote:

doesn't show anything on Visual studio for me, even with every setting set to 0.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/matkoch/resharper-cognitivecomplexity/issues/6?email_source=notifications&email_token=ABGGB7WFGBMVXJ5YZE2MRD3QVPDCFA5CNFSM4IOQRJ5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFCJEYQ#issuecomment-558142050, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGGB7UYUWOSGFOTMROIADDQVPDCFANCNFSM4IOQRJ5A .

programuotojasgf commented 4 years ago

image

matkoch commented 4 years ago

I need glasses.

matkoch commented 4 years ago

@programuotojasgf it's a different issue though if you don't see the tooltip even when the threshold is exceeded. Please create a new one.

matkoch commented 4 years ago

FIxed with 2019.3.1