Marc Ermshaus’ avatar

Marc Ermshaus

Linkblog

Cyclomatic complexity

Published on 29 May 2009. Tagged with programming.

From the Wikipedia page about cyclomatic complexity:

The cyclomatic complexity of a section of source code is the count of the number of linearly independent paths through the source code. For instance, if the source code contained no decision points such as IF statements or FOR loops, the complexity would be 1, since there is only a single path through the code. If the code had a single IF statement containing a single condition there would be two paths through the code, one path where the IF statement is evaluated as TRUE and one path where the IF statement is evaluated as FALSE.