qulice icon indicating copy to clipboard operation
qulice copied to clipboard

Nested switch should be forbidden

Open xupyprmv opened this issue 9 years ago • 9 comments

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

xupyprmv avatar Feb 05 '16 21:02 xupyprmv