No PR decorations after disabling automatic analysis

Before I had automatic code analysis, sonarcloud would put comments in my github PR’s. But when I disabled that (I need code coverage, so I have my CI run tests and the call sonar job), PR comments no longer appear. How to debug this?

  • ALM used GitHub
  • CI system used Github Actions
  • Scanner command used when applicable: ./gradlew sonar (5.1.0.4882)
  • Languages of the repository: kotlin
  • Error observed:
> Task :sonar
Reports path not found or is not a directory: /workspace/ui-legacy/build/test-results/testDebugUnitTest
No input file found for /workspace/ui-legacy/lint-baseline.xml. No android lint issues will be imported on this file.
No input file found for /workspace/ui-legacy/lint-baseline.xml. No android lint issues will be imported on this file.
No input file found for /workspace/ui-legacy/build.gradle.kts. No android lint issues will be imported on this file.
No input file found for /workspace/ui-legacy/build.gradle.kts. No android lint issues will be imported on this file.

> Task :app:lintAnalyzePlayDebug

> Task :app:lintReportPlayDebug
Wrote HTML report to file:///workspace/app/build/reports/lint-results-playDebug.html

> Task :app:lintPlayDebug
> Task :app:lintDebug

> Task :sonar
No input file found for /workspace/shared/network/lint-baseline.xml. No android lint issues will be imported on this file.
No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths='build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml'. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
Reports path contains no files matching TEST-.*.xml : /workspace/shared/ui-components/build/test-results/testDebugUnitTest
No input file found for /workspace/ui-common/lint-baseline.xml. No android lint issues will be imported on this file.
No input file found for /workspace/ui-common/lint-baseline.xml. No android lint issues will be imported on this file.
No input file found for /workspace/app/src/debug/res/drawable/ic_launcher_background.xml. No android lint issues will be imported on this file.
No input file found for /workspace/app/build.gradle.kts. No android lint issues will be imported on this file.
No input file found for /workspace/app/build.gradle.kts. No android lint issues will be imported on this file.
No input file found for /workspace/app/build.gradle.kts. No android lint issues will be imported on this file.
No input file found for /workspace/identity/src/debug/AndroidManifest.xml. No android lint issues will be imported on this file.
Invalid character encountered in file /workspace/shared/build.gradle.kts at line 183 for encoding US-ASCII. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
Analyzing only language associated files, make sure to run the analysis inside a git repository to make use of inclusions specified via "sonar.text.inclusions"

Hey there.

I suppose it goes without saying that your project is still bound to the correct repo?

It definitely was when automatic analysis was running.
Unless turning automatic analysis off causes project to be unbound, then it should still be.
Where can I verify that my repo is properly bound?

You can check the project Administration > General Settings > Repository binding.

It shows as bound.

The problem seems to be that I run sonarcloud in docker container. If I move all runs to normal github actions file, it works. Unfortunately that’s not an option and logs only show that sonar gradle job successfully completed in docker, but no information is seen on sonarcloud.

If I had to guess, it sounds like when SonarCloud is getting run in the Docker container, the appropriate pull request parameters aren’t being set. That would typically mean your PRs just get analyzed and posted to the main branch of your SonarCloud project. Could that be what’s going on?

Thank you, Colin. It works now.

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