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

NoWhitespaceAfter: do not allow whitespace after '@' sign #4410

Closed
strkkk opened this Issue Jun 2, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@strkkk

strkkk commented Jun 2, 2017

I wonder if anybody does that, but compiler allows it.

$ javac MyClass.java
$ cat MyClass.java
public class MyClass {

@ interface Violated{} // expect violation here

@ Violated // expect violation here
public void method(){};

@Override
public String toString(){ return "";}

}

$ cat config.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
    <module name="TreeWalker">
        <module name="NoWhitespaceAfter">
        </module>
    </module>
</module>

$ java -jar checkstyle-7.7-all.jar -c config.xml MyClass.java
Starting audit...
Audit done.

Expect: violations at lines 3 and 5

@strkkk

This comment has been minimized.

Show comment
Hide comment
@strkkk

strkkk Jun 2, 2017

I am working on it.

strkkk commented Jun 2, 2017

I am working on it.

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Sep 16, 2017

Member

Fix was merged

Member

rnveach commented Sep 16, 2017

Fix was merged

@rnveach rnveach closed this Sep 16, 2017

@rnveach rnveach added this to the 8.3 milestone Sep 16, 2017

@rnveach rnveach added the new feature label Sep 16, 2017

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