Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

IndentationCheck, option caseIndent works strange #79

Closed
romani opened this Issue Dec 9, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Owner

romani commented Dec 9, 2013

SF issue: 495
Created: 2007-11-30
Creator: Austin Hastings

option caseIndent=0 should make following code a valid.

Check: http://checkstyle.sourceforge.net/config_misc.html#Indentation

public class SyncError {

    protected void begin(){
        int i=0;
        switch (i)
        {
        case 1: i++;
        default: i++;
        }
    }

}

detected: "Indentation: block child at indentation level 16 not at correct indentation, 24"

@maxvetrenko maxvetrenko was assigned by romani Dec 17, 2014

@maxvetrenko maxvetrenko added a commit to maxvetrenko/checkstyle that referenced this issue Dec 19, 2014

@maxvetrenko maxvetrenko Added UT to show that case indent works correct. #79 4df6c47
Owner

romani commented Dec 19, 2014

fixed in 6.1.1

@romani romani closed this Dec 19, 2014

@mkordas mkordas added a commit to mkordas/checkstyle that referenced this issue Dec 20, 2014

@maxvetrenko @mkordas maxvetrenko + mkordas Added UT to show that case indent works correct. #79 a2fa453

@mkordas mkordas added a commit to mkordas/checkstyle that referenced this issue Dec 20, 2014

@maxvetrenko @mkordas maxvetrenko + mkordas Added UT to show that case indent works correct. #79 df6fb5c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment