Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #11736: Support qualified annotation names for MissingJavadocTy…
…peCheck
- Loading branch information
Showing
12 changed files
with
333 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...checks/javadoc/missingjavadoctype/InputMissingJavadocTypeMultipleQualifiedAnnotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
MissingJavadocType | ||
scope = (default)public | ||
excludeScope = (default)null | ||
skipAnnotations = Ann1, AnnClass.Ann3 | ||
tokens = INTERFACE_DEF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype; | ||
|
||
@interface Ann1 { } | ||
@interface Ann2 { } | ||
@interface Ann3 { } | ||
|
||
class AnnClass { | ||
public @interface Ann1 { } | ||
public @interface Ann2 { } | ||
public @interface Ann3 { } | ||
} | ||
|
||
public class InputMissingJavadocTypeMultipleQualifiedAnnotation { | ||
@Ann1 // ok | ||
@Ann2 | ||
@Ann3 | ||
public interface A { } | ||
|
||
@Ann2 // violation 'Missing a Javadoc comment.' | ||
@Ann3 | ||
public interface B { } | ||
|
||
@Ann2 // ok | ||
@Ann3 | ||
@Ann1 | ||
public interface C { } | ||
|
||
@AnnClass.Ann1 // violation 'Missing a Javadoc comment.' | ||
@Ann2 | ||
@Ann3 | ||
public interface D { } | ||
|
||
@AnnClass.Ann2 // ok | ||
@Ann2 | ||
@AnnClass.Ann3 | ||
public interface E { } | ||
} |
26 changes: 26 additions & 0 deletions
26
...kstyle/checks/javadoc/missingjavadoctype/InputMissingJavadocTypeQualifiedAnnotation1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
MissingJavadocType | ||
scope = (default)public | ||
excludeScope = (default)null | ||
skipAnnotations = (default)Generated | ||
tokens = INTERFACE_DEF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype; | ||
|
||
public class InputMissingJavadocTypeQualifiedAnnotation1 { | ||
public @interface SomeAnnotation { } | ||
|
||
@SomeAnnotation // violation 'Missing a Javadoc comment.' | ||
public interface A { } | ||
|
||
// violation below 'Missing a Javadoc comment.' | ||
@InputMissingJavadocTypeQualifiedAnnotation1.SomeAnnotation | ||
public interface B { } | ||
|
||
@com.puppycrawl.tools.checkstyle.checks.javadoc // violation 'Missing a Javadoc comment.' | ||
.missingjavadoctype.InputMissingJavadocTypeQualifiedAnnotation1.SomeAnnotation | ||
public interface C { } | ||
} |
26 changes: 26 additions & 0 deletions
26
...kstyle/checks/javadoc/missingjavadoctype/InputMissingJavadocTypeQualifiedAnnotation2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
MissingJavadocType | ||
scope = (default)public | ||
excludeScope = (default)null | ||
skipAnnotations = SomeAnnotation | ||
tokens = INTERFACE_DEF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype; | ||
|
||
public class InputMissingJavadocTypeQualifiedAnnotation2 { | ||
public @interface SomeAnnotation { } | ||
|
||
@SomeAnnotation // ok | ||
public interface A { } | ||
|
||
// violation below 'Missing a Javadoc comment.' | ||
@InputMissingJavadocTypeQualifiedAnnotation2.SomeAnnotation | ||
public interface B { } | ||
|
||
@com.puppycrawl.tools.checkstyle.checks.javadoc // violation 'Missing a Javadoc comment.' | ||
.missingjavadoctype.InputMissingJavadocTypeQualifiedAnnotation2.SomeAnnotation | ||
public interface C { } | ||
} |
25 changes: 25 additions & 0 deletions
25
...kstyle/checks/javadoc/missingjavadoctype/InputMissingJavadocTypeQualifiedAnnotation3.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
MissingJavadocType | ||
scope = (default)public | ||
excludeScope = (default)null | ||
skipAnnotations = InputMissingJavadocTypeQualifiedAnnotation3.SomeAnnotation | ||
tokens = INTERFACE_DEF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype; | ||
|
||
public class InputMissingJavadocTypeQualifiedAnnotation3 { | ||
public @interface SomeAnnotation { } | ||
|
||
@SomeAnnotation // violation 'Missing a Javadoc comment.' | ||
public interface A { } | ||
|
||
@InputMissingJavadocTypeQualifiedAnnotation3.SomeAnnotation // ok | ||
public interface B { } | ||
|
||
@com.puppycrawl.tools.checkstyle.checks.javadoc // violation 'Missing a Javadoc comment.' | ||
.missingjavadoctype.InputMissingJavadocTypeQualifiedAnnotation3.SomeAnnotation | ||
public interface C { } | ||
} |
27 changes: 27 additions & 0 deletions
27
...kstyle/checks/javadoc/missingjavadoctype/InputMissingJavadocTypeQualifiedAnnotation4.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
MissingJavadocType | ||
scope = (default)public | ||
excludeScope = (default)null | ||
skipAnnotations = com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype.\ | ||
InputMissingJavadocTypeQualifiedAnnotation4.SomeAnnotation | ||
tokens = INTERFACE_DEF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype; | ||
|
||
public class InputMissingJavadocTypeQualifiedAnnotation4 { | ||
public @interface SomeAnnotation { } | ||
|
||
@SomeAnnotation // violation 'Missing a Javadoc comment.' | ||
public interface A { } | ||
|
||
// violation below 'Missing a Javadoc comment.' | ||
@InputMissingJavadocTypeQualifiedAnnotation4.SomeAnnotation | ||
public interface B { } | ||
|
||
@com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype // ok | ||
.InputMissingJavadocTypeQualifiedAnnotation4.SomeAnnotation | ||
public interface C { } | ||
} |
27 changes: 27 additions & 0 deletions
27
...kstyle/checks/javadoc/missingjavadoctype/InputMissingJavadocTypeQualifiedAnnotation5.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
MissingJavadocType | ||
scope = (default)public | ||
excludeScope = (default)null | ||
skipAnnotations = SomeAnnotation, InputMissingJavadocTypeQualifiedAnnotation5.SomeAnnotation, \ | ||
com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype.\ | ||
InputMissingJavadocTypeQualifiedAnnotation5.SomeAnnotation | ||
tokens = INTERFACE_DEF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype; | ||
|
||
public class InputMissingJavadocTypeQualifiedAnnotation5 { | ||
public @interface SomeAnnotation { } | ||
|
||
@SomeAnnotation // ok | ||
public interface A { } | ||
|
||
@InputMissingJavadocTypeQualifiedAnnotation5.SomeAnnotation // ok | ||
public interface B { } | ||
|
||
@com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadoctype // ok | ||
.InputMissingJavadocTypeQualifiedAnnotation5.SomeAnnotation | ||
public interface C { } | ||
} |
Oops, something went wrong.