SonarCloud remove candidate rule: java:S1172 Unused method parameters should be removed #9922
CDellaGiusta
started this conversation in
Polls
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This poll closes Friday, April 18th 2025.
Candidate rule for removal: java:S1172
Number of issues with this rule in Uyuni: 70
Rule: Unused method parameters should be removed
Software qualities impacted: MAINTAINABILITY
Why is this an issue:
Should it be removed?:
Although it could be a code smell, there are cases in which a particular method MUST be called with one or more arguments, even if they are not used in the code (e.g. API endpoints with a user parameter). Removing the arguments straight away could have side-effects in this case.
If this rule is NOT removed, each case should be carefully evaluated to understand why the argument was not used (if it is a real mistake or some refactoring leftover)
All rule issues in Uyuni: https://sonarcloud.io/project/issues?languages=java&issueStatuses=OPEN%2CCONFIRMED&id=uyuni-project_uyuni&rules=java%3AS1172
Examples in our code:
9 votes ·
Beta Was this translation helpful? Give feedback.
All reactions