![]() ExampleĬyclomatic complexity is defined as measuring “the amount of decision logic in a source code function” NIST235. ![]() Finally, there's a section of citations that can be used to dig deeper into this subject. ![]() In this article, you start out with a simple example of cyclomatic complexity to understand the concept quickly, then look at some additional information on actual usage and suggested limits. At a high level, we determine the value of cyclomatic complexity by counting the number of decisions made in your source code. You can use cyclomatic complexity to get a sense of how hard any given code may be to test, maintain, or troubleshoot as well as an indication of how likely the code will be to produce errors. Essentially, with cyclomatic complexity, higher numbers are bad and lower numbers are good. When working with code metrics, one of the least understood items seems to be cyclomatic complexity. Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
0 Comments
Leave a Reply. |