Annotation Use Style Check, issue #28

This commit is contained in:
alexkravin 2015-03-16 15:00:24 +04:00 committed by Roman Ivanov
parent bffde7e817
commit d44cb066cb
2 changed files with 23 additions and 0 deletions

View File

@ -209,4 +209,15 @@ public class AnnotationUseStyleTest extends BaseCheckTestSupport
verify(checkConfig, getPath("annotation" + File.separator + "DifferentUseStyles.java"), expected);
}
@Test
public void testAnnotationsWithoutDefaultValues() throws Exception
{
DefaultConfiguration checkConfig = createCheckConfig(AnnotationUseStyleCheck.class);
checkConfig.addAttribute("closingParens", "NEVER");
final String[] expected = {
};
verify(checkConfig, getPath("annotation" + File.separator + "AnnotationsUseStyleParams.java"), expected);
}
}

View File

@ -0,0 +1,12 @@
package com.puppycrawl.tools.checkstyle.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
public class AnnotationsUseStyleParams
{
@Target({})
public @interface myAnn {
}
}