-
-
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] LooseCoupling rule: Extend to cover user defined implementations and interfaces #2822
Comments
A property is needed to optionally flag the use of |
Add a property to extend the rule to local variables. |
With PMD7 there is a new property now "allowedTypes" for the rule LooseCoupling. While working on #3657 I found, that we should also allow @oowekyala Wdyt? |
A solution I like more, however, would be to make LooseCoupling allow Stack, but to create another rule that recommends migrating to |
This has been fixed with PMD 7.0.0-rc1. |
Is your feature request related to a problem? Please describe.
The rule LooseCoupling flags implemented classes when interfaces suffice. It prescribes coding against an interface as against implementor classes.
It currently checks for Collections API classes. Please extend the rule so that developers can specify user-defined classes as well.
Describe the solution you'd like
The rule must be made configurable so that users can define interfaces and implementor classes from their application's source base.
Describe alternatives you've considered
None that I know of.
Additional context
None.
Other issues for the same rule:
The text was updated successfully, but these errors were encountered: