You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
goto adds a fundamental increment to Cognitive Complexity, as do break or continue to
a label and other multi-level jumps such as the break or continue to a number found in
some languages. But because an early return can often make code much clearer, no other
jumps or early exits cause an increment.
B1. Increments
goto LABEL, break LABEL, continue LABEL, break NUMBER, continue
NUMBER
Appendix C has a code examples containing a break; (break without a label)
No increment in assigned/given
I apologize if this isn't the correct repo to report this
CodeClimate reports the Cognitive Complexity of the following function as 14
I believe the value should be 12
It seems that CodeClimate is incorrectly incrementing the
continue
statementscontinue;
should not incrementcontinue LABEL;
should incrementThe text was updated successfully, but these errors were encountered: