Archive for February, 2009

Cyclomatic complexity of 110 percent!

Monday, February 16th, 2009

Resharper PowerToys gives our code a whopping 110% of cyclomatic complexity!

..and this is only for a method that has two foreach-loops! Well, one of the loops has an inner-loop with some if-statements but was that really so complex?

Anyway, the good thing about Resharper is that it warns us that our code gets too complex. It helps us decide to urgently refactor-out some of the code, meaning to move some of the code into separate methods or classes. That wil keep our code more maintainable.