Skip to content
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
Closed

NoWhitespaceBefore: Add support for varargs #3718

cypai opened this issue Jan 11, 2017 · 3 comments

Comments

@cypai
Copy link
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
Copy link
Member

romani commented Jan 11, 2017

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

@romani
Copy link
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
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 rnveach added this to the 7.6 milestone Feb 11, 2017
@rnveach
Copy link
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
Projects
None yet
Development

No branches or pull requests

3 participants