No analyses found in Gradle build

  • ALM used (Azure DevOps)
  • CI system used (Azure DevOps)
  • Scanner command used when applicable

In azure-pipeline.yml the following two input parameters were used in Gradle@2 build task:

    sonarQubeRunAnalysis: true
    sqGradlePluginVersionChoice: 'build'

Also there is following task present in Gradle build file before the build step:

    - task: SonarCloudPrepare@1
      SonarCloud: '******'
      organization: '******'
      scannerMode: 'Other'
      extraProperties: |
      # Additional properties that will be passed to the scanner, 
      # Put one key=value per line, example:
      # sonar.exclusions=**/*.bin

And following task after the build step:

    - task: SonarCloudPublish@1
      pollingTimeoutSec: '300'
      SONAR_TOKEN: $(sonarToken)

And were updated with:
  • Languages of the repository: Kotlin, Gradle, Groovy
  • Error observed
    ##[warning]No analyses found in this build! Please check your build configuration.
    Finishing: SonarCloudPublish

Hey there.

Were you able to confirm that the analysis actually did run in your build, without error?

Hello Colin,

The analysis results can be, indeed, found in web, however the pull request decoration or Pipeline results page is not being updated with the Sonar Cloud analysis results. Could you please advise or guide me to the document which is fully describing what is necessary? As I believe I have followed the guidance, still the decoration does not work. I am supporting the Sygic organization and both of our projects have this problem.

Thank you very much!

Kind regards,

Martin Rusko

st 5. 10. 2022 o 11:00 Colin via Sonar Community <> napísal(a):

For reference – the scanner is looking for a report-task.txt file within the Agent build directory, or in the sonar directory for the specific build. The logic can be found here

I would suggest bumping up the Gradle log level --info at least and sharing the logs, redacting any sensitive information.