I have a public method foo()
and a private method bar()
in the same class.
foo()
is the only caller but it clearly invokes bar()
but IntelliJ shows a violation of this rule, squid:UnusedPrivateMethod, for the method declaration of bar()
:
Remove this unused private 'bar' method.
My setup:
- IntelliJ IDEA 2016.3.5 with SonarLint 2.8.0.1735
- SonarLint is connected (connected mode) to a SonarQube 5.6.5 instance which does not identify these violations(!)
foo()
has an@Override
declaration. I don't know if this has any impact but could be useful info
It appears to be a bug in SonarLint. Can someone confirm?