Nothing analyzed from cloud analysis

Template for a good new topic, formatted with Markdown:

  • ALM used: GitHub
  • Languages of the repository: Kotlin
  • Project URL: GitHub - Axl-Lvy/AnkiChess
  • Analysis URL: SonarQube Cloud
  • Error observed: No error nor log observed.
  • Steps to reproduce: Just perform an analysis of my repository through sonar cloud.
  • Potential workaround: Perform the analysis locally through cli.

Hi, the analysis performed through the cloud does not find my code. When I trigger an analysis from the cli in local, I don’t have any issue.

Hey @Axl-Lvy

Thanks for the report. I think I know where the bug might be with Automatic Analysis, but I’ve sent it off to our team for confirmation.

In the meantime, I can suggest that you use CI-based analysis (it should be almost as simple as adding gradle sonar to your existing build. I see the tasks are already in your build.gradle.kts.

Hi, thank you for your reactivity!
I’ve setup the CI-based analysis in this PR ci: sonar by Axl-Lvy · Pull Request #12 · Axl-Lvy/AnkiChess · GitHub but unfortunately the result was the same SonarQube Cloud
Did I make a mistake somewhere ?

I think this is just a case of your PR only changing files that aren’t analyzed by SonarQube. PR analyses in SonarQube only show results on changed files.

The logs make me think everything analyzed correctly. Once you merge this PR, you should have an analyses of all the code on your main branch.

And, there is definitely still a problem with how your project is being handled by Automatic Analysis. Our team should look into it soon!

Indeed, that worked great, thanks! I will anyway keep that CI-based analysis.
Still I’m curious about the reason why the automatic didn’t work, so I will keep watching this thread (with absolutely no urgency). Especially, is it somehow related to Kotlin MultiPlatform ? It’s quite recent and not yet supported everywhere I guess..

I’m pretty sure (to be confirmed) that because you have a Gradle project, our Automatic Analysis for Java worker kicks in and looks for files in /src/main/java and is oblivious to code in other directories.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.