Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
NeedBraces: False Positives for LITERAL_CASE and LITERAL_DEFAULT #4764
I expect no violations reported. Based on local testing, the incorrect violations started being reported with Checkstyle 6.4. Please see comment in java test file for list of locally tested versions and the results.
Though we don't specify when acceptable tokens were added in our documentation at http://checkstyle.sourceforge.net/config_blocks.html#NeedBraces ,
I'm not sure why there is no error specifying the tokens being used weren't acceptable when doing regression with 6.3, but it must be a bug of some kind in old code as there will be an error in 6.4 if it was not part of acceptable. It was probably all part of the same commit that fixed this.