Closed nrmancuso closed 2 years ago
Some teams may prefer whitespace around style:
void method1(int...myVarargs) { // expected violation
in case this code is compliable (it is a surprise for me), https://checkstyle.org/config_whitespace.html#NoWhitespaceAfter check can be enhanced with ellipsis token as well (not default ofc)
Some teams may prefer whitespace around style...
@pbludov do you think we should not make ELLIPSIS
a default token?
@pbludov do you think we should not make
ELLIPSIS
a default token?
Let's make it and look at the regression tests.
On it.
I have downloaded the latest cli 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
Check documentation at https://checkstyle.sourceforge.io/config_whitespace.html#WhitespaceAfter
How it works Now:
However,
WhitespaceAroundCheck
does supportELLIPSIS
. But, this is not a frequently used style. In fact, the JLS specifically mentions thatIs your feature request related to a problem? Please describe. I would expect
...
to be a valid token forWhitespaceAfterCheck
, and for it to enforce style noted above.Describe the solution you'd like
Additional context
Noticed at https://github.com/checkstyle/checkstyle/pull/11094#discussion_r775249437, WhitespaceAfterCheck does not currently support
ELLIPSIS
token.ELLIPSIS
should be a default token forWhitespaceAfterCheck
. Since we use default module for this check incheckstyle_checks.xml
, we may find some violations in the project.