Copy link to clipboard
Copied
Hi,
I wonder if someone can explain the following questions regarding the "UnusedParameterRule":
And I know I can change the severity of the rule or ignore the rule entirely, but it is important to me to understand why I should or shouldn't...
TIA,
Mylène
Copy link to clipboard
Copied
Hi Mylène,
The default severity of a rule is always subject to change depending on the project.
One could argue that an unused formal parameter hits maintainability, and hence would be a blocker.
For that one, I would agree with you. I think that should be a warning by default.
FYI, in the Java PMD documentation website (http://pmd.sourceforge.net/rules/unusedcode.html) states:
Avoid passing parameters to methods or constructors and then not using those parameters.
and they provide a (too?) simple example.
You can open a ticket on JIRA so that we change the default severity.
Cheers,
Xavier
Copy link to clipboard
Copied
Thanks,
I will
Mylène
Copy link to clipboard
Copied
The issue has been fixed against trunk and closed on JIRA
Cheers,
Xavier