diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocTypeCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocTypeCheck.java index 6381efcac63..cd6e34a8373 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocTypeCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocTypeCheck.java @@ -53,7 +53,8 @@ * *
+ * Example that allows missing comments for classes annotated with {@code @Annotation} + * and {@code @MyClass.Annotation}: + *
+ *+ * @Annotation // ok + * class Class1 {} + * + * @MyClass.Annotation // ok + * class Class2 {} + * + * @com.mycompany.MyClass.Annotation // violation, as this form is missed in config + * class Class3 {} + *+ *
+ * Use following configuration: + *
+ *+ * <module name="MissingJavadocType"> + * <property name="skipAnnotations" value="Annotation,MyClass.Annotation"/> + * </module> + *+ *
* Parent is {@code com.puppycrawl.tools.checkstyle.TreeWalker} *
*
@@ -174,7 +197,8 @@ public class MissingJavadocTypeCheck extends AbstractCheck {
/**
* Specify annotations that allow missed documentation.
- * Only short names are allowed, e.g. {@code Generated}.
+ * If annotation is present in target sources in multiple forms of qualified
+ * name - all forms should be listed in this property.
*/
private Set
+ Example that allows missing comments for classes annotated with
+ Use following configuration:
specify annotations that allow missed documentation.
- Only short names are allowed, e.g.
Generated
.
+ If annotation is present in target sources in multiple forms of qualified
+ name - all forms should be listed in this property.
String[]
@@ -2994,6 +2995,27 @@ class DatabaseConfiguration {}
+
+ Generated
@Annotation
and @MyClass.Annotation
:
+