-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add Check Support for Java 21 Unnamed Variables & Patterns Syntax: WhitespaceAfter #15057
Comments
I agree with this violation, but this is more because there should be whitespaces around the
I will say at first this seems odd to me, but without any type maybe it makes some sense? I would have to code more on this to know for sure.
I more leaning to this. Parameter names or anything variable name related are not supported in this check currently. This issue seems to me like an odd leap for this check. Do we have any best practices that say this way is better? @nrmancuso What is your thoughts? |
Let's revisit this one later on. |
We should rely on the surrounding tokens for checking whitespace, conceptually this is no different than any other identifier. I am approving this for a new test case only. |
child of #14942
I have read check documentation: https://checkstyle.sourceforge.io/checks/whitespace/whitespaceafter.html#WhitespaceAfter
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 want in detail.
I think the check should support
UNNAMED_PATTERN_DEF
. IMO, it is visually cleaner when we have a space after the underscore. do you think it should be no white space as someone suggested before?The text was updated successfully, but these errors were encountered: