kotlin:S1172 Support @Suppress to ignore rules on certain cases


Here is another typical Android use case. Once you assigned a listener to a view you need to provide a certain method signature in the corresponding method:


private fun handleClick(@Suppress("UNUSED_PARAMETER") view: View) {
   // do something

Lint understands the suppression but SonarLint ignores it and raises kotlin:S1172 as a code smell.
Let me know if you need more information regarding this issue.


1 Like

Hi Tobias,

I created this false-positive ticket SONARSLANG-431 to improve SonarKotlin.

Thanks for your feedback,


1 Like