-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-25333 Add maven enforcer rule to ban VisibleForTesting imports #2854
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Ping @apurtell. And @petersomogyi FYI. |
pom.xml
Outdated
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports"> | ||
<includeTestCode>true</includeTestCode> | ||
<commentLineBufferSize>512</commentLineBufferSize> | ||
<reason>Use RestrictedApi annotation in error prone instead</reason> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HBASE-24640 replaced VisibleForTesting with IA.Private annotation. The reason
in this restrictImports
should recommend the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this is the case. Even in IA.Public classes, not all the IA.Private annotations are for testing, and here we are telling a more general rule, not only for IA.Public classes. Saying that use IA.Private instead of VisibleForTesting will make developers confusing.
Let me see if I could make things more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the wording. PTAL. Thanks.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…2854) Signed-off-by: Peter Somogyi <psomogyi@apache.org>
…2854) Signed-off-by: Peter Somogyi <psomogyi@apache.org>
No description provided.