Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[java] Fix Issue 1343: Update CommentDefaultAccessModifierRule #1400
Before submitting a PR, please check that:
Fixes #1343, the class CommentDefaultAccessModifierRule now extends AbstractIgnoredAnnotationRule. Also added a small comment about the ignored nodes in CommentDefaultAccessModifierRule.
Thanks for the PR!
Extending AbstractIgnoredAnnotationRule is however only part of the work needed here:
- The old implementation for ignoring
should be updated to make use of the property from the new super class
- The default values for this rule need to be adjusted to have VisibleForTesting by default ignored (see method
defaultSuppressionAnnotations()which can be overridden)
- The documentation for the rule should be updated to mention, that VisibleForTesting is ignored by default but can be adjusted by the property.
- We have a unit test for this case already:
but it might be good, to add a unit test, which modifies the properties to ignore another annotation (for unit tests, see also https://pmd.github.io/pmd-6.8.0/pmd_userdocs_extending_testing.html