Skip to content

Issue #7176: Add AnnotatedMethodVisibilityModifierCheck#19164

Open
gianmarcoschifone wants to merge 1 commit into
checkstyle:masterfrom
gianmarcoschifone:7176
Open

Issue #7176: Add AnnotatedMethodVisibilityModifierCheck#19164
gianmarcoschifone wants to merge 1 commit into
checkstyle:masterfrom
gianmarcoschifone:7176

Conversation

@gianmarcoschifone
Copy link
Copy Markdown
Member

@gianmarcoschifone gianmarcoschifone commented Mar 10, 2026

@gianmarcoschifone gianmarcoschifone force-pushed the 7176 branch 6 times, most recently from 4f3a4e1 to 7170a03 Compare March 10, 2026 16:31
@gianmarcoschifone
Copy link
Copy Markdown
Member Author

GitHub, generate website

@gianmarcoschifone
Copy link
Copy Markdown
Member Author

GitHub, generate report

@github-actions
Copy link
Copy Markdown
Contributor

@gianmarcoschifone
Copy link
Copy Markdown
Member Author

GitHub, generate website

@gianmarcoschifone
Copy link
Copy Markdown
Member Author

@gianmarcoschifone gianmarcoschifone force-pushed the 7176 branch 2 times, most recently from 91c9fdf to 2281c83 Compare March 16, 2026 10:56
Copy link
Copy Markdown
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rebase.

items:

* element, its visibility modifier must match one of the allowed values.
* </p>
*
* @since 13.4.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13.5.0

Copy link
Copy Markdown
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something wrong with name of Check.

Method Visibility vs target Class.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants