TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  CFL#016Checked automatically with code checker

Synopsis:Do not have overly complex functions
Language:C++
Severity Level:4
Category:Control Flow


Description:

If a function is too complex, it can be difficult to comprehend. The cyclomatic complexity of a function, i.e. the number of linearly independent paths through a function, should not exceed the agreed maximum. A function with a cyclomatic complexity less than 5 is considered to be ok. However, if its cyclomatic complexity is higher than 10, refactoring is recommended.



Literature References:
Ellemtel Rec. 47
ISC++ Rec. 4.7