resharper-cyclomatic-complexity icon indicating copy to clipboard operation
resharper-cyclomatic-complexity copied to clipboard

Sunsetting Cyclomatic Complexity in favor of Cognitive Complexity plugin

Open matkoch opened this issue 4 months ago • 5 comments

Hi folks!

There is a Cognitive Complexity plugin available for while. In my opinion it can act as a full and even better replacement. In the wild I've seen some folks who had both plugins enabled and it was never clear to my why.

If you have strong objections, then please leave a comment below!

Thanks

matkoch avatar Aug 29 '25 13:08 matkoch

I was also using both plugins, because cognitive and cyclomatic complexity values are calculated differently, and while the cyclomatic value can be okay, the cognitive value could be already "red". I mainly use it to align to the sonar rules already during developement, which also has both categories "cognitive complexity" and "cyclomatic complexity", so I can avoid having to refactor the code, after the sonar checks.

ArminOebb avatar Sep 02 '25 11:09 ArminOebb

Thanks for your input. FTR, I'm reading this more as a background story rather than an objection.

matkoch avatar Sep 02 '25 13:09 matkoch

Thanks for the suggestion (it works). (I was looking for recent reported bugs because the Cyclomatic Complexity plugin is not working anymore. )

chfn avatar Sep 29 '25 13:09 chfn

@matkoch aren't these 2 different code metrics though?

udlose avatar Nov 15 '25 09:11 udlose

@udlose I think of cognitive as the successor to cyclomatic complexity.

matkoch avatar Nov 24 '25 16:11 matkoch