Unused import false positives (still)

We just migrated from SonarQube 8.9 LTS to 9.9 LTS. We use the default ruleset and the latest Gradle plugin (3.5.0.2730). After the migration we see a lot of false positives for imports for delegation functions which were already covered in these issues (import androidx.compose.runtime.getValue):

Is this a regression or are the fixes (SONARKT-139, SONARKT-182) not shipped?

I tried to check which SonarKotlin version we are using (build into 9.9 I guess?), but was not able to find out.

Hi,

Can you provide a compact reproducer: import and use?

 
Ann

Hi @ganncamp,

it’s the exact same issue as mentioned in kotlin:S1128 False Positive Jetpack Compose with the same minimal code sample: kotlin:S1128 False Positive Jetpack Compose

Since we are using SonarQube 9.9 LTS selfhosted, is there a chance that some of the rules are outdated? How can I verify that we are using the latest ones?

Hello @G00fY2,

Thanks for your message. I need a bit more information to be able to investigate the issue:

  1. Is it happening on SQ or in SL? As you’re talking about SonarQube and the thread you’re referencing is about SonarLint. If it’s SonarLint, is it connected mode or not?
  2. Could you, please, share the analysis configuration?
  3. Could you, please, share the analysis log?
  4. Are you mixing Java & Kotlin code?
  5. Have you changed the values of the properties sonar.java.libraries and sonar.java.binaries?

Regards,
Margarita