Unable to import Android Lint report file(s)

  • ALM used: Github
  • CI system used: Bitrise
  • Scanner command used when applicable (./gradlew sonar -D…options…)
  • Languages of the repository: Kotlin

I’m running sonar on android project using gradle.
I’m doing that on Bitrise.
It works well, but there are couple of warnings in the log when running the sonar gradle task.
One of them is related to linting, we do not depend on android linting.
So, we need a way to exclude that lint report from Sonar.
Notice that we don’t rung gradle lint task. That’s why the lint xml report file is not generated.
How can we do that?

The error message:

Unable to import Android Lint report file(s):
- /bitrise/src/app/build/reports/lint-results-debug.xml
The report file(s) can not be found. Check that the property 'sonar.androidLint.reportPaths' is correctly configured.

Also, we got these two warnings:

No merge base found between HEAD and refs/remotes/origin/main
Could not report issue with code highlighting, using plain text instead. Check whether the product is outdated.

How can we handle them?

Hey there.

What version of the Scanner for Gradle are you using?

We are using v

I guess the question is why is the property getting filled. The code can be found here:

I’m a bit out of my depths, so I’ll flag this for some experts.

Hello @mahmoud, could you please check if this thread helps you?

Thanks @angelo.buono, I replied in the thread that you shared.

What about this warning?

Could not report issue with code highlighting, using plain text instead. Check whether the product is outdated.

Hello @mahmoud, the warning happens because you’re most likely using an old version of SonarLint that doesn’t support the code highlighting feature. It is not an issue, simply the code that raises the issue won’t be highlighted.

I didn’t include the SonarLint.
I only use the sonar for gradle with version which is the latest version.
If the linting task is included in that version, then it must be the most up-to-date version.
Also, I did not include any other dependency for sonar linting.

How can I disable the liniting from sonar for gradle then to remove that warning?

Hello @mahmoud, there is nothing to worry about for this warning. I have created an issue to deal with it and you can check its progress at [SONARKT-365] - Jira.

The warning is raised because we assume that the highlighting feature is always available in the product, but this is not the case for Sonar Cloud. For now, you can simply ignore the warning.



We are getting the same warning. Is there any way to disable this? We are not using SonarLint