New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParenPad incorretly flags unsupported token #14747
Comments
|
This sounds like a duplicate of #4175 |
@romani @rnveach I am confirming that the issue in processExpression method checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/ParenPadCheck.java Lines 179 to 198 in e70836b
We are traversing the whole subtree under any expression and validating every My proposed solution is to remove the deep scan from example: for ( int i = 0; i < ( long) ( 2 * ( 4 / 2)); i++) {} all the parens in the above example were checked under expression now we should remove this deep scanning under expression and add please share your thoughts I am not sure if this is a good solution because we may end up adding a lot of new tokens in the check |
I am on it and waiting for a confirmation of the approach above |
Should be considered with #4175
I have read check documentation: https://checkstyle.org/checks/whitespace/parenpad.html#ParenPad
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
Describe what you expect in detail.
no violation as
RECORD_PATTERN
token is not supported in the check .Note: Check supports token RECORD_DEF .
The text was updated successfully, but these errors were encountered: