forked from OpenCover/opencover
-
Notifications
You must be signed in to change notification settings - Fork 0
Cyclomatic Complexity
sawilde edited this page Jul 11, 2011
·
4 revisions
Okay the standard resources for this topic appear to be the Thomas J McCabe paper (http://www.literateprogramming.com/mccabe.pdf) and good old wikipedia (http://en.wikipedia.org/wiki/Cyclomatic_complexity).
But it seems to simplify as "number of decisions" + 1. With IL we have conditional branches, switch statements and we also have try/catch/fault/filter statements (I didn't include try/finally as this to me is part of the original path).
For now I have decided the leverage the Cyclomatic Complexity metric as produced by the Gendarme AvoidComplexMethodsRule. It also uses Mono.Cecil and so is easy to integrate into OpenCover.