RSPEC-1172 - unused parameter not working with @Path in a method

  • What language is this for?

  • Which rule?
    RSPEC-1172 Unused method parameters should be removed

  • Why do you believe it’s a false-negative?

The following code triggers the rule:

public int method(int a, int b) {
    return a+1;

but if you add an annotation, the method pass without any issue:


public int method(int a, int b) {
    return a+1;
  • Are you using
    • SonarCloud


Welcome to the community and thanks for this report!

Where are you seeing this? SonarCloud? Or SonarQube / SonarLint? And if either of the latter two, which version?


SonarCloud. The problem also appears in Eclipse with SonarLint for Eclipse

1 Like

Hello @anderson ,

Thank you for reporting the issue.
I have created a ticket about it.