Rule: DefaultPackage
Is your feature request related to a problem? Please describe. I just don't see any use case for this rule. This rule assumes that any usage of package-access is accidental, and by doing so, prohibits using a really fundamental and useful feature of the language.
To satisfy the rule, you have to make the member public even if it doesn't need to, or make it protected, which muddies your intent even more if you don't intend the class to be extended, and may be at odds with other rules like AvoidProtectedFieldInFinalClass.
Also, we already have CommentDefaultAccessModifier, which flags the same thing, but has an escape hatch. This is I think a more reasonable rule, which should be used instead.
Describe the solution you'd like Deprecate the rule DefaultPackage for removal in pmd 7
Describe alternatives you've considered None
Additional context
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4