Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar Android Lint no matching issues found

I have got the following trouble: I have installed SonarQube and Android Plugin with "Android Lint" Quality Profile. When I execute my build.gradle script with "Android Lint" profile, sonar-runner plugin works good, but in SonarQube I can see no matching issues found, just zero.

Nevertheless, when I include another profile –not "Android Lint"– I can see a lot of issues. Also in my android SDK when apply it's own lint I can see 157 issues. What it can be?

sonar - version 3.7.4;
android plugin - version 0.1
like image 765
Vladimir Voitekhovski Avatar asked Oct 02 '22 03:10

Vladimir Voitekhovski


1 Answers

Your sonar.sources property should point to the root of AndroidManifest.xml file. E.g. if your AndroidManifest.xml file is located in src/main then your build.gradle file should contain:

sonarRunner {
    sonarProperties {
        ...
        property "sonar.sources", "src/main"
        property "sonar.profile", "Android Lint"
        ...
    }
}

If you need more paths in sonar.sources you can put them as a comma-separated list.

You can find how Sonar Android Plugin determines whether to run the analysis in its source code.

like image 191
Artur Stepniewski Avatar answered Oct 13 '22 10:10

Artur Stepniewski