-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[java] Add ignoredAnnotations property to unusedPrivateMethod rule #951
Conversation
@djydewang this looks very good! Remember to transform the set in |
@djydewang oh! I missed that! awesome! |
* the node to check | ||
* @return <code>true</code> if the annotation has been found | ||
*/ | ||
protected boolean hasNeglectAnnotation(MethodNameDeclaration node) { |
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.
Maybe this should be enough of a common pattern (checking if a node has an annotation in a particular set) that we could move that logic to ASTMethodDeclaration someday. Otherwise it'll be duplicated in every rule that needs it...
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.
Same logic here.
pmd/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/AbstractLombokAwareRule.java
Line 89 in 0967d50
protected boolean hasLombokAnnotation(Node node) { |
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 added #956 to track this.
This is now merged and will be part of PMD 6.2.0. Thanks a lot @djydewang! |
Fixed Issue #907