Issue #7176: Add AnnotatedMethodVisibilityModifierCheck#19164
Issue #7176: Add AnnotatedMethodVisibilityModifierCheck#19164gianmarcoschifone wants to merge 1 commit into
Conversation
4f3a4e1 to
7170a03
Compare
|
GitHub, generate website |
|
GitHub, generate report |
|
GitHub, generate website |
|
Hi @romani , PR is ready for review. |
91c9fdf to
2281c83
Compare
| * element, its visibility modifier must match one of the allowed values. | ||
| * </p> | ||
| * | ||
| * @since 13.4.0 |
romani
left a comment
There was a problem hiding this comment.
if we fully targeting to Methods, do we need extra tokens for types ?
| TokenTypes.IMPORT, | ||
| // tokens that can have annotations | ||
| TokenTypes.CLASS_DEF, | ||
| TokenTypes.INTERFACE_DEF, |
There was a problem hiding this comment.
something wrong with name of Check.
Method Visibility vs target Class.
There was a problem hiding this comment.
The check should target any token that can have a visibility modifier, not just method, as reported in #7176.
Could we rename the check to AnnotatedVisibilityModifier?
|
@gianmarcoschifone , please rebase and make it versioned 13.8.0 , I will make sue review if finished in July |
|
@romani done |
|
CI is not happy , please address |
|
@romani I think this check will need some changes because what I tried was attempting to handle unqualified annotations through package and imports, this brought me to add non compilable resources |
Issue #7176
Contribution repo PR: checkstyle/contribution#1042
New module config: https://gist.githubusercontent.com/gianmarcoschifone/45d9200df8159aec19512b81c377eb04/raw/fc481f46ec46b7a61839fbf1728bd8e8dbaa126d/annotatedmethodvisibilitymodifier.xml