[KongchangAI]
ConceptCyclomatic Complexity

Cyclomatic Complexity

A code complexity metric introduced by Thomas McCabe in 1976. It measures the number of independent execution paths through a program, and it is generally recommended that a single function not exceed a cyclomatic complexity of 10.

Core Facts

Timeline (last 90 days)

Oct 13

Cyclomatic complexity only counts control flow branches and is completely insensitive to data coupling, naming quality, and whether the level of abstraction is appropriate.

Unverified50%
Sep 25

Cyclomatic Complexity, proposed by Thomas McCabe in 1976, quantifies code complexity by counting the number of independent execution paths in the code.

Unverified50%
Sep 25

Software engineering generally recommends that the cyclomatic complexity of a single function not exceed 10.

Unverified50%
Sep 12

Commonly used metrics for code quality assessment include cyclomatic complexity, code duplication rate, unit test coverage, and whether SOLID principles are followed.

Unverified50%
Jul 21

Cyclomatic complexity was proposed by Thomas McCabe in 1976, calculated as M = E - N + 2P, and the industry typically sets the upper limit of cyclomatic complexity for a single module at 10–15.

Verified65%

All Facts (10)

Source Articles