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

NoWhitespaceBefore: Add support for varargs #3718

Closed
cypai opened this Issue Jan 11, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@cypai
Contributor

cypai commented Jan 11, 2017

I was surprised to see that NoWhitespaceBefore does not support varargs:

$ javac Test.java 
$ cat Test.java
public class Test {
    public static void main(String ... args) {} // Would like to have a violation here
}

There's no easy regex for this, so it would be nice to have this addition.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jan 11, 2017

Member

I even surprised it is compilable, I have never seen such a code.

Member

romani commented Jan 11, 2017

I even surprised it is compilable, I have never seen such a code.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jan 12, 2017

Member

This token should be in set of defaults

Member

romani commented Jan 12, 2017

This token should be in set of defaults

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 7, 2017

Issue #3718: Add NoWhitespaceBefore support for varargs
The Ellipses Token is enabled by default.

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 7, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 7, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 7, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 7, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 7, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 7, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 10, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 10, 2017

robertpainsi added a commit to robertpainsi/checkstyle that referenced this issue Feb 10, 2017

rnveach added a commit that referenced this issue Feb 11, 2017

@rnveach rnveach added this to the 7.6 milestone Feb 11, 2017

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Feb 11, 2017

Member

Fix is merged

Member

rnveach commented Feb 11, 2017

Fix is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment