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

AnnotationUseStyle does not detect all violations in EXPANDED style #6818

strkkk opened this issue Jun 13, 2019 · 1 comment


None yet
3 participants
Copy link

commented Jun 13, 2019

$ cat
public class TestClass {
    @MyAnnotation(@Deprecated) // violation
        class Example1 {}
        @MyAnnotation({}) // violation
        class Example2 {}
        @MyAnnotation(@Deprecated()) // violation
        class Example3 {}

        @interface MyAnnotation {
        Deprecated[] value();

$ cat config.xml
<?xml version="1.0"?>
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"

<module name="Checker">
    <property name="charset" value="UTF-8"/>

    <module name="TreeWalker">
<module name="FinalLocalVariable" />

<module name="AnnotationUseStyleCheck">
<property name="elementStyle" value="expanded" />
<property name="closingParens" value="ignore" />

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

Expected: violations on lines commented with // violation


This comment has been minimized.

Copy link

commented Jun 15, 2019

Fix was merged

@rnveach rnveach closed this Jun 15, 2019

@rnveach rnveach added this to the 8.22 milestone Jun 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.