qulice
qulice copied to clipboard
Nested switch should be forbidden
Nested switch should be forbidden by qulice.
For example checking next code:
public static int next(final int xxx,
final int yyy) throws IOException {
final int result;
switch (xxx) {
case 0:
switch (yyy) {
case 0:
result = 0;
break;
case 1:
result = 1;
break;
default:
result = 0;
}
break;
case 1:
result = 0;
break;
default:
result = 1;
}
return result;
}
must returns something like:
Nested switches are not allowed