Subject: | Re: McCube Complexity |
Date: | Mon, 22 Feb 2016 12:56:05 +0300 |
To: | bug-Perl-Metrics-Simple [...] rt.cpan.org |
From: | Alexander Batyrshin <0x62ash [...] gmail.com> |
In previous post I made mistakes.
Here is correct information:
1.
sub test {
if (1) {
} else {
}
if (2) {
} else {
}
}
Expect - 3, Got - 5
https://en.wikipedia.org/wiki/Cyclomatic_complexity proves that for 2 seq
IF complexity = 3.
2.
sub test {
if (1) {
} else {
}
if (2) {
} else {
}
if (3) {
} else {
}
}
Expect - 4, Got - 7