Root.Smell.Complexity |
Parent | Index |
Sibling aspects | ClassSmell | MethodSmell | Naming |
This aspect checks on the cyclomatic complexity of your code.
Taste | Meaning | Values |
---|---|---|
cyclomatic_complexity |
This the maximum number of embedded branches or embedded loops allowed. | 6 |
* bold denotes default value
This aspect does not have any sub aspects.
for (i=0; i<n; ++i){
for (i=0; i<n; ++i){
for (i=0; i<n; ++i){
for (i=0; i<n; ++i){
for (i=0; i<n; ++i){
for (i=0; i<n; ++i){
for (i=0; i<n; ++i){
for (i=0; i<n; ++i){
...
//do something
...
}
Very complex code are difficult to read, debug and maintain. It is always a good idea to keep things as simple as possible.
This can be solved by breaking down complex functions into smaller onces.