GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — [java] UseObjectForClearerAPI Only For Public by Vampire · Pull Request #1752 · pmd/pmd Conversation
|
Generated by 🚫 Danger |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Vampire thanks for the PR! You are absolutely right about this. Would you care to include a unit test to make sure the issue is never reintroduced in the future? Just adding a new Thanks in advance! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sure, I'll have a look. One question though, is it intended that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
And if not, is it an error of the rule that is uses |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Vampire The ReferenceType node has an attribute Quite honestly I don't see the point of this method and why it only counts strings. There's already a rule TooManyParameters or ParameterCount idk whose proposed correction is to use an object. Maybe that one should be enriched with an option to ignore private methods instead, and this rule dropped. Is there something I'm not seeing about why string parameters in particular are bad? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't know, I just wondered about why it complains about a private method when the description said it only checks public methods. So independent of whether this gets deprecated and replaced by some other rule, when I'm at fixing this, should I also check the array depth as the description says it is only about |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f710edb to
f3c0d39
Compare
|
I pushed a version now that has tests and also checks for array. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Let me chime in:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[java] UseObjectForClearerAPI flags private methods
There was an error while loading. Please reload this page.