Image for McCabe's complexity

McCabe's complexity

McCabe's complexity, also known as cyclomatic complexity, is a software metric used to measure the complexity of a program's control flow. It calculates the number of independent paths through a program's code, based on its decision points like loops and conditionals. A higher McCabe complexity indicates that the code is more complicated and may be harder to understand, test, and maintain. By identifying complex areas, developers can improve code quality and reduce errors, making software more robust and easier to manage over time.